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
.without_trait = methods and assoc const are still usable outside the current expression, only `impl Local` and `impl dyn Local` are local and only if the `Local` type is at the same nesting as the `impl` block
450
-
.with_trait = 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
+
.with_trait = an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
451
451
.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
452
452
.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
453
453
.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
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
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
+
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
10
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`
11
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
12
12
= 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/consts.stderr
+5-5
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: `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
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
+
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
13
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
14
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>
15
15
= note: `#[warn(non_local_definitions)]` on by default
@@ -22,7 +22,7 @@ LL | impl Uto2 for Test {}
22
22
|
23
23
= help: move this `impl` block outside the of the current static `A`
24
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
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`
25
+
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
26
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
27
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>
28
28
@@ -34,7 +34,7 @@ LL | impl Uto3 for Test {}
34
34
|
35
35
= help: move this `impl` block outside the of the current constant `B`
36
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
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`
37
+
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
38
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
39
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>
40
40
@@ -86,7 +86,7 @@ LL | impl Uto9 for Test {}
86
86
|
87
87
= help: move this `impl` block outside the of the current closure `<unnameable>` and up 2 bodies
88
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
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`
89
+
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
90
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>
91
91
92
92
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
@@ -97,7 +97,7 @@ LL | impl Uto10 for Test {}
97
97
|
98
98
= help: move this `impl` block outside the of the current constant expression `<unnameable>` and up 2 bodies
99
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
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`
100
+
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
101
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-6
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ LL | | }
11
11
|
12
12
= help: move this `impl` block outside the of the current function `main`
13
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
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
+
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
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
@@ -28,7 +28,7 @@ LL | | }
28
28
|
29
29
= help: move this `impl` block outside the of the current function `main`
30
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
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`
31
+
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
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
34
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
@@ -44,7 +44,7 @@ LL | | }
44
44
|
45
45
= help: move this `impl` block outside the of the current function `main`
46
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
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`
47
+
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
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
50
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
@@ -60,7 +60,7 @@ LL | | }
60
60
|
61
61
= help: move this `impl` block outside the of the current function `main`
62
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
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`
63
+
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
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
66
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
@@ -76,7 +76,7 @@ LL | | }
76
76
|
77
77
= help: move this `impl` block outside the of the current function `main`
78
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
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`
79
+
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
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
82
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
@@ -92,7 +92,7 @@ LL | | }
92
92
|
93
93
= help: move this `impl` block outside the of the current function `main`
94
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
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`
95
+
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
96
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