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
.non_local = an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
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
450
+
.exception = anon-const (`const _: () = {"{"} ... {"}"}`) at top-level module and anon-const at the same nesting as the trait or type are consider to be transparent regarding the nesting level
451
451
.const_anon = use a const-anon item to suppress this lint
452
452
453
453
lint_non_local_definitions_macro_rules = non-local `macro_rules!` definition, `#[macro_export]` macro should be written at top level module
= help: move this `impl` block outside the of the current constant `_IMPL_DEBUG`
8
8
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
9
-
= 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
10
-
= 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>
11
9
= note: the macro `non_local_macro::non_local_impl` may come from an old version of the `non_local_macro` crate, try updating your dependency with `cargo update -p non_local_macro`
10
+
= note: anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type are consider to be transparent regarding the nesting level
11
+
= 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>
12
12
= note: `#[warn(non_local_definitions)]` on by default
13
13
= note: this warning originates in the macro `non_local_macro::non_local_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
Copy file name to clipboardExpand all lines: tests/ui/lint/non-local-defs/consts.stderr
+4-8Lines changed: 4 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ LL | impl Uto for &Test {}
9
9
|
10
10
= help: move this `impl` block outside the of the current constant `Z`
11
11
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
12
-
= 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
12
+
= note: anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type are consider to be transparent regarding the nesting level
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
@@ -21,7 +21,7 @@ LL | impl Uto2 for Test {}
21
21
|
22
22
= help: move this `impl` block outside the of the current static `A`
23
23
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
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
24
+
= note: anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type are consider to be transparent regarding the nesting level
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
27
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
@@ -32,7 +32,7 @@ LL | impl Uto3 for Test {}
32
32
|
33
33
= help: move this `impl` block outside the of the current constant `B`
34
34
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
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
35
+
= note: anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type are consider to be transparent regarding the nesting level
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
38
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
@@ -46,7 +46,6 @@ LL | | }
46
46
|
47
47
= help: move this `impl` block outside the of the current function `main`
48
48
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
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
49
= 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
50
52
51
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
@@ -60,7 +59,6 @@ LL | | }
60
59
|
61
60
= help: move this `impl` block outside the of the current inline constant `<unnameable>` and up 2 bodies
62
61
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
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
62
= 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
63
66
64
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
@@ -74,7 +72,7 @@ LL | | }
74
72
|
75
73
= help: move this `impl` block outside the of the current constant `_` and up 2 bodies
76
74
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
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
75
+
= note: anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type are consider to be transparent regarding the nesting level
78
76
= 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
77
80
78
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
@@ -85,7 +83,6 @@ LL | impl Uto9 for Test {}
85
83
|
86
84
= help: move this `impl` block outside the of the current closure `<unnameable>` and up 2 bodies
87
85
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
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
86
= 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
87
91
88
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
@@ -96,7 +93,6 @@ LL | impl Uto10 for Test {}
96
93
|
97
94
= help: move this `impl` block outside the of the current constant expression `<unnameable>` and up 2 bodies
98
95
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
99
-
= 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
100
96
= 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>
Copy file name to clipboardExpand all lines: tests/ui/lint/non-local-defs/exhaustive-trait.stderr
-6Lines changed: 0 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,6 @@ LL | | }
11
11
|
12
12
= help: move this `impl` block outside the of the current function `main`
13
13
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
14
-
= 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
15
14
= 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
15
= note: `#[warn(non_local_definitions)]` on by default
17
16
@@ -28,7 +27,6 @@ LL | | }
28
27
|
29
28
= help: move this `impl` block outside the of the current function `main`
30
29
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
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
30
= 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
31
34
32
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
@@ -44,7 +42,6 @@ LL | | }
44
42
|
45
43
= help: move this `impl` block outside the of the current function `main`
46
44
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
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
45
= 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
46
50
47
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
@@ -60,7 +57,6 @@ LL | | }
60
57
|
61
58
= help: move this `impl` block outside the of the current function `main`
62
59
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
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
60
= 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
61
66
62
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
@@ -76,7 +72,6 @@ LL | | }
76
72
|
77
73
= help: move this `impl` block outside the of the current function `main`
78
74
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
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
75
= 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
76
82
77
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
@@ -92,7 +87,6 @@ LL | | }
92
87
|
93
88
= help: move this `impl` block outside the of the current function `main`
94
89
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
95
-
= 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
96
90
= 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>
0 commit comments