You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: compiler/rustc_lint/messages.ftl
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -440,7 +440,7 @@ lint_non_local_definitions_cargo_update = the {$macro_kind} `{$macro_name}` may
440
440
441
441
lint_non_local_definitions_deprecation = this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
442
442
443
-
lint_non_local_definitions_impl = non-local `impl` definition, they should be avoided as they go against expectation
443
+
lint_non_local_definitions_impl = non-local `impl` definition, `impl` blocks should be written at the same level as their item
444
444
.help =
445
445
move this `impl` block outside the of the current {$body_kind_descr}{$depth->
446
446
[one] `{$body_name}`
@@ -450,7 +450,7 @@ lint_non_local_definitions_impl = non-local `impl` definition, they should be av
450
450
.exception = one exception to the rule are anon-const (`const _: () = {"{"} ... {"}"}`) at top-level module and anon-const at the same nesting as the trait or type
451
451
.const_anon = use a const-anon item to suppress this lint
452
452
453
-
lint_non_local_definitions_macro_rules = non-local `macro_rules!` definition, they should be avoided as they go against expectation
453
+
lint_non_local_definitions_macro_rules = non-local `macro_rules!` definition, `#[macro_export]` macro should be written at top level module
454
454
.help =
455
455
remove the `#[macro_export]` or move this `macro_rules!` outside the of the current {$body_kind_descr}{$depth->
Copy file name to clipboardExpand all lines: tests/ui/lint/non-local-defs/consts.stderr
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
warning: non-local `impl` definition, they should be avoided as they go against expectation
1
+
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
2
2
--> $DIR/consts.rs:13:5
3
3
|
4
4
LL | const Z: () = {
@@ -13,7 +13,7 @@ LL | impl Uto for &Test {}
13
13
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
14
14
= note: `#[warn(non_local_definitions)]` on by default
15
15
16
-
warning: non-local `impl` definition, they should be avoided as they go against expectation
16
+
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
17
17
--> $DIR/consts.rs:24:5
18
18
|
19
19
LL | impl Uto2 for Test {}
@@ -24,7 +24,7 @@ LL | impl Uto2 for Test {}
24
24
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
25
25
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
26
26
27
-
warning: non-local `impl` definition, they should be avoided as they go against expectation
27
+
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
28
28
--> $DIR/consts.rs:32:5
29
29
|
30
30
LL | impl Uto3 for Test {}
@@ -35,7 +35,7 @@ LL | impl Uto3 for Test {}
35
35
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
36
36
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
37
37
38
-
warning: non-local `impl` definition, they should be avoided as they go against expectation
38
+
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
39
39
--> $DIR/consts.rs:43:5
40
40
|
41
41
LL | / impl Test {
@@ -49,7 +49,7 @@ LL | | }
49
49
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
50
50
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
51
51
52
-
warning: non-local `impl` definition, they should be avoided as they go against expectation
52
+
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
53
53
--> $DIR/consts.rs:50:9
54
54
|
55
55
LL | / impl Test {
@@ -63,7 +63,7 @@ LL | | }
63
63
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
64
64
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
65
65
66
-
warning: non-local `impl` definition, they should be avoided as they go against expectation
66
+
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
67
67
--> $DIR/consts.rs:59:9
68
68
|
69
69
LL | / impl Test {
@@ -77,7 +77,7 @@ LL | | }
77
77
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
78
78
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
79
79
80
-
warning: non-local `impl` definition, they should be avoided as they go against expectation
80
+
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
81
81
--> $DIR/consts.rs:72:9
82
82
|
83
83
LL | impl Uto9 for Test {}
@@ -88,7 +88,7 @@ LL | impl Uto9 for Test {}
88
88
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
89
89
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
90
90
91
-
warning: non-local `impl` definition, they should be avoided as they go against expectation
91
+
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
Copy file name to clipboardExpand all lines: tests/ui/lint/non-local-defs/exhaustive-trait.stderr
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
warning: non-local `impl` definition, they should be avoided as they go against expectation
1
+
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
2
2
--> $DIR/exhaustive-trait.rs:7:5
3
3
|
4
4
LL | / impl PartialEq<()> for Dog {
@@ -15,7 +15,7 @@ LL | | }
15
15
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
16
16
= note: `#[warn(non_local_definitions)]` on by default
17
17
18
-
warning: non-local `impl` definition, they should be avoided as they go against expectation
18
+
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
19
19
--> $DIR/exhaustive-trait.rs:14:5
20
20
|
21
21
LL | / impl PartialEq<()> for &Dog {
@@ -31,7 +31,7 @@ LL | | }
31
31
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
32
32
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
33
33
34
-
warning: non-local `impl` definition, they should be avoided as they go against expectation
34
+
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
35
35
--> $DIR/exhaustive-trait.rs:21:5
36
36
|
37
37
LL | / impl PartialEq<Dog> for () {
@@ -47,7 +47,7 @@ LL | | }
47
47
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
48
48
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
49
49
50
-
warning: non-local `impl` definition, they should be avoided as they go against expectation
50
+
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
51
51
--> $DIR/exhaustive-trait.rs:28:5
52
52
|
53
53
LL | / impl PartialEq<&Dog> for () {
@@ -63,7 +63,7 @@ LL | | }
63
63
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
64
64
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
65
65
66
-
warning: non-local `impl` definition, they should be avoided as they go against expectation
66
+
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
67
67
--> $DIR/exhaustive-trait.rs:35:5
68
68
|
69
69
LL | / impl PartialEq<Dog> for &Dog {
@@ -79,7 +79,7 @@ LL | | }
79
79
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
80
80
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
81
81
82
-
warning: non-local `impl` definition, they should be avoided as they go against expectation
82
+
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
0 commit comments