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
+
.bounds = `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
450
451
.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
452
.const_anon = use a const-anon item to suppress this lint
= help: move this `impl` block outside the of the current constant `_IMPL_DEBUG`
8
+
= note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
8
9
= 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
10
= 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
11
= 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
Copy file name to clipboardExpand all lines: tests/ui/lint/non-local-defs/consts.stderr
+5
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@ LL | impl Uto for &Test {}
8
8
| ^^^^^^^^^^^^^^^^^^^^^
9
9
|
10
10
= help: move this `impl` block outside the of the current constant `Z`
11
+
= note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
11
12
= 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
13
= 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
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>
@@ -20,6 +21,7 @@ LL | impl Uto2 for Test {}
20
21
| ^^^^^^^^^^^^^^^^^^^^^
21
22
|
22
23
= help: move this `impl` block outside the of the current static `A`
24
+
= note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
23
25
= 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
26
= 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
27
= 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>
@@ -31,6 +33,7 @@ LL | impl Uto3 for Test {}
31
33
| ^^^^^^^^^^^^^^^^^^^^^
32
34
|
33
35
= help: move this `impl` block outside the of the current constant `B`
36
+
= note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
34
37
= 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
38
= 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
39
= 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>
@@ -82,6 +85,7 @@ LL | impl Uto9 for Test {}
82
85
| ^^^^^^^^^^^^^^^^^^^^^
83
86
|
84
87
= help: move this `impl` block outside the of the current closure `<unnameable>` and up 2 bodies
88
+
= note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
85
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`
86
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>
87
91
@@ -92,6 +96,7 @@ LL | impl Uto10 for Test {}
92
96
| ^^^^^^^^^^^^^^^^^^^^^^
93
97
|
94
98
= help: move this `impl` block outside the of the current constant expression `<unnameable>` and up 2 bodies
99
+
= note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
95
100
= 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`
96
101
= 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
+6
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@ LL | | }
10
10
| |_____^
11
11
|
12
12
= help: move this `impl` block outside the of the current function `main`
13
+
= note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
13
14
= 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
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>
15
16
= note: `#[warn(non_local_definitions)]` on by default
@@ -26,6 +27,7 @@ LL | | }
26
27
| |_____^
27
28
|
28
29
= help: move this `impl` block outside the of the current function `main`
30
+
= note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
29
31
= 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`
30
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>
31
33
@@ -41,6 +43,7 @@ LL | | }
41
43
| |_____^
42
44
|
43
45
= help: move this `impl` block outside the of the current function `main`
46
+
= note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
44
47
= 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`
45
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>
46
49
@@ -56,6 +59,7 @@ LL | | }
56
59
| |_____^
57
60
|
58
61
= help: move this `impl` block outside the of the current function `main`
62
+
= note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
59
63
= 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`
60
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>
61
65
@@ -71,6 +75,7 @@ LL | | }
71
75
| |_____^
72
76
|
73
77
= help: move this `impl` block outside the of the current function `main`
78
+
= note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
74
79
= 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`
75
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>
76
81
@@ -86,6 +91,7 @@ LL | | }
86
91
| |_____^
87
92
|
88
93
= help: move this `impl` block outside the of the current function `main`
94
+
= note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
89
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`
90
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>
0 commit comments