Skip to content

Commit fa1a67b

Browse files
committed
revert wording changes to main message
1 parent 18830bb commit fa1a67b

File tree

481 files changed

+1019
-1019
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

481 files changed

+1019
-1019
lines changed

compiler/rustc_lint/messages.ftl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ lint_opaque_hidden_inferred_bound_sugg = add this bound
604604
lint_or_patterns_back_compat = the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro
605605
.suggestion = use pat_param to preserve semantics
606606
607-
lint_out_of_scope_macro_calls = cannot find macro `{$path}`
607+
lint_out_of_scope_macro_calls = cannot find macro `{$path}` in this scope
608608
.label = not found in this scope
609609
.help = import `macro_rules` with `use` to make it callable above its definition
610610
@@ -646,7 +646,7 @@ lint_pattern_in_foreign = patterns aren't allowed in foreign function declaratio
646646
lint_private_extern_crate_reexport = extern crate `{$ident}` is private and cannot be re-exported
647647
.suggestion = consider making the `extern crate` item publicly accessible
648648
649-
lint_proc_macro_derive_resolution_fallback = cannot find {$ns} `{$ident}`
649+
lint_proc_macro_derive_resolution_fallback = cannot find {$ns} `{$ident}` in this scope
650650
.label = names from parent modules are not accessible without an explicit import
651651
652652
lint_ptr_null_checks_fn_ptr = function pointers are not nullable, so checking them for null will always return false

compiler/rustc_resolve/messages.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ resolve_cannot_determine_macro_resolution =
8080
resolve_cannot_find_builtin_macro_with_name =
8181
cannot find a built-in macro with name `{$ident}`
8282
83-
resolve_cannot_find_ident_in_this_scope = cannot find {$expected} `{$ident}`
83+
resolve_cannot_find_ident_in_this_scope = cannot find {$expected} `{$ident}` in this scope
8484
.label = not found in this scope
8585
8686
resolve_cannot_glob_import_possible_crates =

compiler/rustc_resolve/src/late.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3917,7 +3917,7 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
39173917

39183918
// There are two different error messages user might receive at
39193919
// this point:
3920-
// - E0412 cannot find type `{}`
3920+
// - E0412 cannot find type `{}` in this scope
39213921
// - E0433 failed to resolve: use of undeclared type or module `{}`
39223922
//
39233923
// The first one is emitted for paths in type-position, and the

compiler/rustc_resolve/src/late/diagnostics.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ impl<'a: 'ast, 'ast, 'tcx> LateResolutionVisitor<'a, '_, 'ast, 'tcx> {
351351
};
352352

353353
BaseError {
354-
msg: format!("cannot find {expected} `{item_str}`"),
354+
msg: format!("cannot find {expected} `{item_str}` in {mod_prefix}{mod_str}"),
355355
fallback_label,
356356
span: item_span,
357357
span_label,
@@ -2528,7 +2528,7 @@ impl<'a: 'ast, 'ast, 'tcx> LateResolutionVisitor<'a, '_, 'ast, 'tcx> {
25282528
if let Some(generics) = kind.generics() {
25292529
if span.overlaps(generics.span) {
25302530
// Avoid the following:
2531-
// error[E0405]: cannot find trait `A`
2531+
// error[E0405]: cannot find trait `A` in this scope
25322532
// --> $DIR/typo-suggestion-named-underscore.rs:CC:LL
25332533
// |
25342534
// L | fn foo<T: A>(x: T) {} // Shouldn't suggest underscore

src/tools/clippy/tests/ui/crashes/ice-6252.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0412]: cannot find type `PhantomData`
1+
error[E0412]: cannot find type `PhantomData` in this scope
22
--> tests/ui/crashes/ice-6252.rs:9:9
33
|
44
LL | _n: PhantomData,
@@ -9,7 +9,7 @@ help: consider importing this struct
99
LL + use std::marker::PhantomData;
1010
|
1111

12-
error[E0412]: cannot find type `VAL`
12+
error[E0412]: cannot find type `VAL` in this scope
1313
--> tests/ui/crashes/ice-6252.rs:11:63
1414
|
1515
LL | impl<N, M> TypeVal<usize> for Multiply<N, M> where N: TypeVal<VAL> {}

src/tools/clippy/tests/ui/option_map_unit_fn_unfixable.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
error[E0425]: cannot find value `x`
1+
error[E0425]: cannot find value `x` in this scope
22
--> tests/ui/option_map_unit_fn_unfixable.rs:17:5
33
|
44
LL | x.field.map(|value| { do_nothing(value); do_nothing(value) });
55
| ^ not found in this scope
66

7-
error[E0425]: cannot find value `x`
7+
error[E0425]: cannot find value `x` in this scope
88
--> tests/ui/option_map_unit_fn_unfixable.rs:19:5
99
|
1010
LL | x.field.map(|value| if value > 0 { do_nothing(value); do_nothing(value) });
1111
| ^ not found in this scope
1212

13-
error[E0425]: cannot find value `x`
13+
error[E0425]: cannot find value `x` in this scope
1414
--> tests/ui/option_map_unit_fn_unfixable.rs:23:5
1515
|
1616
LL | x.field.map(|value| {
1717
| ^ not found in this scope
1818

19-
error[E0425]: cannot find value `x`
19+
error[E0425]: cannot find value `x` in this scope
2020
--> tests/ui/option_map_unit_fn_unfixable.rs:27:5
2121
|
2222
LL | x.field.map(|value| { do_nothing(value); do_nothing(value); });

tests/rustdoc-ui/doctest/failed-doctest-output.stdout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ test $DIR/failed-doctest-output.rs - SomeStruct (line 15) ... FAILED
66
failures:
77

88
---- $DIR/failed-doctest-output.rs - OtherStruct (line 25) stdout ----
9-
error[E0425]: cannot find value `no`
9+
error[E0425]: cannot find value `no` in this scope
1010
--> $DIR/failed-doctest-output.rs:26:1
1111
|
1212
LL | no

tests/rustdoc-ui/impl-fn-nesting.stderr

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,58 @@
1-
error: cannot find macro `unknown_macro`
1+
error: cannot find macro `unknown_macro` in this scope
22
--> $DIR/impl-fn-nesting.rs:32:13
33
|
44
LL | unknown_macro!();
55
| ^^^^^^^^^^^^^ not found in this scope
66

7-
error[E0405]: cannot find trait `UnknownBound`
7+
error[E0405]: cannot find trait `UnknownBound` in this scope
88
--> $DIR/impl-fn-nesting.rs:11:13
99
|
1010
LL | pub fn f<B: UnknownBound>(a: UnknownType, b: B) {
1111
| ^^^^^^^^^^^^ not found in this scope
1212

13-
error[E0412]: cannot find type `UnknownType`
13+
error[E0412]: cannot find type `UnknownType` in this scope
1414
--> $DIR/impl-fn-nesting.rs:11:30
1515
|
1616
LL | pub fn f<B: UnknownBound>(a: UnknownType, b: B) {
1717
| ^^^^^^^^^^^ not found in this scope
1818

19-
error[E0405]: cannot find trait `UnknownTrait`
19+
error[E0405]: cannot find trait `UnknownTrait` in this scope
2020
--> $DIR/impl-fn-nesting.rs:14:10
2121
|
2222
LL | impl UnknownTrait for ValidType {}
2323
| ^^^^^^^^^^^^ not found in this scope
2424

25-
error[E0405]: cannot find trait `UnknownTrait`
25+
error[E0405]: cannot find trait `UnknownTrait` in this scope
2626
--> $DIR/impl-fn-nesting.rs:15:27
2727
|
2828
LL | impl<T: UnknownBound> UnknownTrait for T {}
2929
| ^^^^^^^^^^^^ not found in this scope
3030

31-
error[E0405]: cannot find trait `UnknownBound`
31+
error[E0405]: cannot find trait `UnknownBound` in this scope
3232
--> $DIR/impl-fn-nesting.rs:15:13
3333
|
3434
LL | impl<T: UnknownBound> UnknownTrait for T {}
3535
| ^^^^^^^^^^^^ not found in this scope
3636

37-
error[E0412]: cannot find type `UnknownType`
37+
error[E0412]: cannot find type `UnknownType` in this scope
3838
--> $DIR/impl-fn-nesting.rs:18:25
3939
|
4040
LL | impl ValidTrait for UnknownType {}
4141
| ^^^^^^^^^^^ not found in this scope
4242

43-
error[E0405]: cannot find trait `UnknownBound`
43+
error[E0405]: cannot find trait `UnknownBound` in this scope
4444
--> $DIR/impl-fn-nesting.rs:20:53
4545
|
4646
LL | impl ValidTrait for ValidType where ValidTrait: UnknownBound {}
4747
| ^^^^^^^^^^^^ not found in this scope
4848

49-
error[E0412]: cannot find type `UnknownType`
49+
error[E0412]: cannot find type `UnknownType` in this scope
5050
--> $DIR/impl-fn-nesting.rs:25:21
5151
|
5252
LL | type Item = UnknownType;
5353
| ^^^^^^^^^^^ not found in this scope
5454

55-
error[E0412]: cannot find type `UnknownType`
55+
error[E0412]: cannot find type `UnknownType` in this scope
5656
--> $DIR/impl-fn-nesting.rs:44:37
5757
|
5858
LL | pub fn doubly_nested(c: UnknownType) {

tests/rustdoc-ui/issues/issue-81662-shortness.stdout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ test $DIR/issue-81662-shortness.rs - foo (line 8) ... FAILED
55
failures:
66

77
---- $DIR/issue-81662-shortness.rs - foo (line 8) stdout ----
8-
$DIR/issue-81662-shortness.rs:9:1: error[E0425]: cannot find function `foo`
8+
$DIR/issue-81662-shortness.rs:9:1: error[E0425]: cannot find function `foo` in this scope
99
error: aborting due to 1 previous error
1010
Couldn't compile the test.
1111

tests/ui/annotate-snippet/missing-type.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0412]: cannot find type `Iter`
1+
error[E0412]: cannot find type `Iter` in this scope
22
--> $DIR/missing-type.rs:5:12
33
|
44
LL | let x: Iter;

tests/ui/argument-suggestions/extern-fn-arg-names.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0412]: cannot find type `err`
1+
error[E0412]: cannot find type `err` in this scope
22
--> $DIR/extern-fn-arg-names.rs:2:29
33
|
44
LL | fn dstfn(src: i32, dst: err);

tests/ui/argument-suggestions/issue-109831.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0412]: cannot find type `C`
1+
error[E0412]: cannot find type `C` in this scope
22
--> $DIR/issue-109831.rs:4:24
33
|
44
LL | struct A;
@@ -16,7 +16,7 @@ help: you might be missing a type parameter
1616
LL | fn f<C>(b1: B, b2: B, a2: C) {}
1717
| +++
1818

19-
error[E0425]: cannot find value `C`
19+
error[E0425]: cannot find value `C` in this scope
2020
--> $DIR/issue-109831.rs:7:16
2121
|
2222
LL | struct A;

tests/ui/array-slice-vec/slice-pat-type-mismatches.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0425]: cannot find value `does_not_exist`
1+
error[E0425]: cannot find value `does_not_exist` in this scope
22
--> $DIR/slice-pat-type-mismatches.rs:26:11
33
|
44
LL | match does_not_exist {

tests/ui/asm/issue-113788.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
//@ needs-asm-support
33
//@ only-x86_64
44
fn main() {
5-
let peb: *const PEB; //~ ERROR cannot find type `PEB` [E0412]
5+
let peb: *const PEB; //~ ERROR cannot find type `PEB`
66
unsafe { std::arch::asm!("mov {0}, fs:[0x30]", out(reg) peb); }
77
}

tests/ui/asm/issue-113788.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0412]: cannot find type `PEB`
1+
error[E0412]: cannot find type `PEB` in this scope
22
--> $DIR/issue-113788.rs:5:21
33
|
44
LL | let peb: *const PEB;

tests/ui/associated-consts/issue-93835.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
error[E0425]: cannot find value `p`
1+
error[E0425]: cannot find value `p` in this scope
22
--> $DIR/issue-93835.rs:4:19
33
|
44
LL | type_ascribe!(p, a<p:p<e=6>>);
55
| ^ not found in this scope
66

7-
error[E0412]: cannot find type `a`
7+
error[E0412]: cannot find type `a` in this scope
88
--> $DIR/issue-93835.rs:4:22
99
|
1010
LL | type_ascribe!(p, a<p:p<e=6>>);
1111
| ^ not found in this scope
1212

13-
error[E0405]: cannot find trait `p`
13+
error[E0405]: cannot find trait `p` in this scope
1414
--> $DIR/issue-93835.rs:4:26
1515
|
1616
LL | type_ascribe!(p, a<p:p<e=6>>);

tests/ui/associated-item/issue-87638.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0576]: cannot find associated type `Output`
1+
error[E0576]: cannot find associated type `Output` in trait `Trait`
22
--> $DIR/issue-87638.rs:17:26
33
|
44
LL | type Target;
@@ -10,7 +10,7 @@ LL | let _: <S as Trait>::Output;
1010
| not found in trait `Trait`
1111
| help: maybe you meant this associated type: `Target`
1212

13-
error[E0576]: cannot find method or associated constant `BAR`
13+
error[E0576]: cannot find method or associated constant `BAR` in trait `Trait`
1414
--> $DIR/issue-87638.rs:20:27
1515
|
1616
LL | const FOO: usize;

tests/ui/associated-path-shl.stderr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
error[E0412]: cannot find type `A`
1+
error[E0412]: cannot find type `A` in this scope
22
--> $DIR/associated-path-shl.rs:4:14
33
|
44
LL | let _: <<A>::B>::C;
55
| ^ not found in this scope
66

7-
error[E0412]: cannot find type `A`
7+
error[E0412]: cannot find type `A` in this scope
88
--> $DIR/associated-path-shl.rs:5:15
99
|
1010
LL | let _ = <<A>::B>::C;
1111
| ^ not found in this scope
1212

13-
error[E0412]: cannot find type `A`
13+
error[E0412]: cannot find type `A` in this scope
1414
--> $DIR/associated-path-shl.rs:6:11
1515
|
1616
LL | let <<A>::B>::C;
1717
| ^ not found in this scope
1818

19-
error[E0412]: cannot find type `A`
19+
error[E0412]: cannot find type `A` in this scope
2020
--> $DIR/associated-path-shl.rs:7:17
2121
|
2222
LL | let 0 ..= <<A>::B>::C;
2323
| ^ not found in this scope
2424

25-
error[E0412]: cannot find type `A`
25+
error[E0412]: cannot find type `A` in this scope
2626
--> $DIR/associated-path-shl.rs:8:7
2727
|
2828
LL | <<A>::B>::C;

tests/ui/associated-type-bounds/missing-trait-bound-for-assoc-fails.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
fn foo<M>(_m: M)
33
where
44
M::Item: Temp,
5-
//~^ ERROR cannot find trait `Temp` [E0405]
5+
//~^ ERROR cannot find trait `Temp`
66
//~| ERROR associated type `Item` not found for `M` [E0220]
77
{
88
}

tests/ui/associated-type-bounds/missing-trait-bound-for-assoc-fails.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0405]: cannot find trait `Temp`
1+
error[E0405]: cannot find trait `Temp` in this scope
22
--> $DIR/missing-trait-bound-for-assoc-fails.rs:4:14
33
|
44
LL | M::Item: Temp,

tests/ui/associated-types/associated-types-eq-1.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0412]: cannot find type `A`
1+
error[E0412]: cannot find type `A` in this scope
22
--> $DIR/associated-types-eq-1.rs:10:12
33
|
44
LL | fn foo2<I: Foo>(x: I) {

tests/ui/associated-types/issue-19883.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0576]: cannot find associated type `Dst`
1+
error[E0576]: cannot find associated type `Dst` in trait `From`
22
--> $DIR/issue-19883.rs:9:30
33
|
44
LL | type Output;

tests/ui/associated-types/issue-22037.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0576]: cannot find associated type `X`
1+
error[E0576]: cannot find associated type `X` in trait `A`
22
--> $DIR/issue-22037.rs:3:33
33
|
44
LL | type Output;

tests/ui/async-await/async-closures/tainted-body.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0425]: cannot find function `used_fn`
1+
error[E0425]: cannot find function `used_fn` in this scope
22
--> $DIR/tainted-body.rs:9:9
33
|
44
LL | used_fn();

tests/ui/async-await/async-fn/not-a-trait.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0404]: expected trait, found struct `S`
44
LL | fn test(x: impl async S) {}
55
| ^ not a trait
66

7-
error[E0405]: cannot find trait `Missing`
7+
error[E0405]: cannot find trait `Missing` in this scope
88
--> $DIR/not-a-trait.rs:10:26
99
|
1010
LL | fn missing(x: impl async Missing) {}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
//@ edition:2018
22

33
async fn foobar_async(x: u32, (a, _, _c): (u32, u32, u32), _: u32, _y: u32) {
4-
assert_eq!(__arg1, (1, 2, 3)); //~ ERROR cannot find value `__arg1` [E0425]
5-
assert_eq!(__arg2, 4); //~ ERROR cannot find value `__arg2` [E0425]
4+
assert_eq!(__arg1, (1, 2, 3)); //~ ERROR cannot find value `__arg1`
5+
assert_eq!(__arg2, 4); //~ ERROR cannot find value `__arg2`
66
}
77

88
async fn baz_async(ref mut x: u32, ref y: u32) {
9-
assert_eq!(__arg0, 1); //~ ERROR cannot find value `__arg0` [E0425]
10-
assert_eq!(__arg1, 2); //~ ERROR cannot find value `__arg1` [E0425]
9+
assert_eq!(__arg0, 1); //~ ERROR cannot find value `__arg0`
10+
assert_eq!(__arg1, 2); //~ ERROR cannot find value `__arg1`
1111
}
1212

1313
fn main() {}

tests/ui/async-await/drop-order/drop-order-locals-are-hidden.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
error[E0425]: cannot find value `__arg1`
1+
error[E0425]: cannot find value `__arg1` in this scope
22
--> $DIR/drop-order-locals-are-hidden.rs:4:16
33
|
44
LL | assert_eq!(__arg1, (1, 2, 3));
55
| ^^^^^^ not found in this scope
66

7-
error[E0425]: cannot find value `__arg2`
7+
error[E0425]: cannot find value `__arg2` in this scope
88
--> $DIR/drop-order-locals-are-hidden.rs:5:16
99
|
1010
LL | assert_eq!(__arg2, 4);
1111
| ^^^^^^ not found in this scope
1212

13-
error[E0425]: cannot find value `__arg0`
13+
error[E0425]: cannot find value `__arg0` in this scope
1414
--> $DIR/drop-order-locals-are-hidden.rs:9:16
1515
|
1616
LL | assert_eq!(__arg0, 1);
1717
| ^^^^^^ not found in this scope
1818

19-
error[E0425]: cannot find value `__arg1`
19+
error[E0425]: cannot find value `__arg1` in this scope
2020
--> $DIR/drop-order-locals-are-hidden.rs:10:16
2121
|
2222
LL | assert_eq!(__arg1, 2);

0 commit comments

Comments
 (0)