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
= help: move this `impl` block outside the of the current constant `_IMPL_DEBUG`
7
+
= help: move this `impl` block and all the necessary types/traits 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
9
= note: an `impl` is never scoped, even when it is nested inside an item, as it 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`
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
@@ -7,7 +7,7 @@ LL | const Z: () = {
7
7
LL | impl Uto for &Test {}
8
8
| ^^^^^^^^^^^^^^^^^^^^^
9
9
|
10
-
= help: move this `impl` block outside the of the current constant `Z`
10
+
= help: move this `impl` block and all the necessary types/traits 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
12
= note: an `impl` is never scoped, even when it is nested inside an item, as it 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
@@ -20,7 +20,7 @@ warning: non-local `impl` definition, `impl` blocks should be written at the sam
20
20
LL | impl Uto2 for Test {}
21
21
| ^^^^^^^^^^^^^^^^^^^^^
22
22
|
23
-
= help: move this `impl` block outside the of the current static `A`
23
+
= help: move this `impl` block and all the necessary types/traits 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
25
= note: an `impl` is never scoped, even when it is nested inside an item, as it 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
@@ -32,7 +32,7 @@ warning: non-local `impl` definition, `impl` blocks should be written at the sam
32
32
LL | impl Uto3 for Test {}
33
33
| ^^^^^^^^^^^^^^^^^^^^^
34
34
|
35
-
= help: move this `impl` block outside the of the current constant `B`
35
+
= help: move this `impl` block and all the necessary types/traits 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
37
= note: an `impl` is never scoped, even when it is nested inside an item, as it 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
@@ -47,7 +47,7 @@ LL | | fn foo() {}
47
47
LL | | }
48
48
| |_____^
49
49
|
50
-
= help: move this `impl` block outside the of the current function `main`
50
+
= help: move this `impl` block and all the necessary types/traits outside the of the current function `main`
51
51
= note: 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
52
52
= 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>
53
53
@@ -60,7 +60,7 @@ LL | | fn hoo() {}
60
60
LL | | }
61
61
| |_________^
62
62
|
63
-
= help: move this `impl` block outside the of the current inline constant `<unnameable>` and up 2 bodies
63
+
= help: move this `impl` block and all the necessary types/traits outside the of the current inline constant `<unnameable>` and up 2 bodies
64
64
= note: 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
65
65
= 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>
66
66
@@ -73,7 +73,7 @@ LL | | fn foo2() {}
73
73
LL | | }
74
74
| |_________^
75
75
|
76
-
= help: move this `impl` block outside the of the current constant `_` and up 2 bodies
76
+
= help: move this `impl` block and all the necessary types/traits outside the of the current constant `_` and up 2 bodies
77
77
= note: 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
78
78
= 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
79
79
= 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>
@@ -84,7 +84,7 @@ warning: non-local `impl` definition, `impl` blocks should be written at the sam
84
84
LL | impl Uto9 for Test {}
85
85
| ^^^^^^^^^^^^^^^^^^^^^
86
86
|
87
-
= help: move this `impl` block outside the of the current closure `<unnameable>` and up 2 bodies
87
+
= help: move this `impl` block and all the necessary types/traits 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
89
= note: an `impl` is never scoped, even when it is nested inside an item, as it 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>
@@ -95,7 +95,7 @@ warning: non-local `impl` definition, `impl` blocks should be written at the sam
95
95
LL | impl Uto10 for Test {}
96
96
| ^^^^^^^^^^^^^^^^^^^^^^
97
97
|
98
-
= help: move this `impl` block outside the of the current constant expression `<unnameable>` and up 2 bodies
98
+
= help: move this `impl` block and all the necessary types/traits 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
100
= note: an `impl` is never scoped, even when it is nested inside an item, as it 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-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ LL | | }
9
9
LL | | }
10
10
| |_____^
11
11
|
12
-
= help: move this `impl` block outside the of the current function `main`
12
+
= help: move this `impl` block and all the necessary types/traits 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
14
= note: an `impl` is never scoped, even when it is nested inside an item, as it 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>
@@ -26,7 +26,7 @@ LL | | }
26
26
LL | | }
27
27
| |_____^
28
28
|
29
-
= help: move this `impl` block outside the of the current function `main`
29
+
= help: move this `impl` block and all the necessary types/traits 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
31
= note: an `impl` is never scoped, even when it is nested inside an item, as it 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>
@@ -42,7 +42,7 @@ LL | | }
42
42
LL | | }
43
43
| |_____^
44
44
|
45
-
= help: move this `impl` block outside the of the current function `main`
45
+
= help: move this `impl` block and all the necessary types/traits 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
47
= note: an `impl` is never scoped, even when it is nested inside an item, as it 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>
@@ -58,7 +58,7 @@ LL | | }
58
58
LL | | }
59
59
| |_____^
60
60
|
61
-
= help: move this `impl` block outside the of the current function `main`
61
+
= help: move this `impl` block and all the necessary types/traits 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
63
= note: an `impl` is never scoped, even when it is nested inside an item, as it 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>
@@ -74,7 +74,7 @@ LL | | }
74
74
LL | | }
75
75
| |_____^
76
76
|
77
-
= help: move this `impl` block outside the of the current function `main`
77
+
= help: move this `impl` block and all the necessary types/traits 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
79
= note: an `impl` is never scoped, even when it is nested inside an item, as it 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>
@@ -90,7 +90,7 @@ LL | | }
90
90
LL | | }
91
91
| |_____^
92
92
|
93
-
= help: move this `impl` block outside the of the current function `main`
93
+
= help: move this `impl` block and all the necessary types/traits 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
95
= note: an `impl` is never scoped, even when it is nested inside an item, as it 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