Skip to content

Commit 5f47d1f

Browse files
committed
revert wording changes to main message
1 parent 3abad14 commit 5f47d1f

File tree

483 files changed

+1028
-1028
lines changed

Some content is hidden

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

483 files changed

+1028
-1028
lines changed

compiler/rustc_lint/messages.ftl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ lint_opaque_hidden_inferred_bound_sugg = add this bound
609609
lint_or_patterns_back_compat = the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro
610610
.suggestion = use pat_param to preserve semantics
611611
612-
lint_out_of_scope_macro_calls = cannot find macro `{$path}`
612+
lint_out_of_scope_macro_calls = cannot find macro `{$path}` in this scope
613613
.label = not found in this scope
614614
.help = import `macro_rules` with `use` to make it callable above its definition
615615
@@ -651,7 +651,7 @@ lint_pattern_in_foreign = patterns aren't allowed in foreign function declaratio
651651
lint_private_extern_crate_reexport = extern crate `{$ident}` is private and cannot be re-exported
652652
.suggestion = consider making the `extern crate` item publicly accessible
653653
654-
lint_proc_macro_derive_resolution_fallback = cannot find {$ns} `{$ident}`
654+
lint_proc_macro_derive_resolution_fallback = cannot find {$ns} `{$ident}` in this scope
655655
.label = names from parent modules are not accessible without an explicit import
656656
657657
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
@@ -3918,7 +3918,7 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
39183918

39193919
// There are two different error messages user might receive at
39203920
// this point:
3921-
// - E0412 cannot find type `{}`
3921+
// - E0412 cannot find type `{}` in this scope
39223922
// - E0433 failed to resolve: use of undeclared type or module `{}`
39233923
//
39243924
// 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,
@@ -2522,7 +2522,7 @@ impl<'a: 'ast, 'ast, 'tcx> LateResolutionVisitor<'a, '_, 'ast, 'tcx> {
25222522
if let Some(generics) = kind.generics() {
25232523
if span.overlaps(generics.span) {
25242524
// Avoid the following:
2525-
// error[E0405]: cannot find trait `A`
2525+
// error[E0405]: cannot find trait `A` in this scope
25262526
// --> $DIR/typo-suggestion-named-underscore.rs:CC:LL
25272527
// |
25282528
// 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;

0 commit comments

Comments
 (0)