@@ -13,10 +13,7 @@ help: move this `impl` block outside of the current constant `Z`
13
13
--> $DIR/consts.rs:13:5
14
14
|
15
15
LL | impl Uto for &Test {}
16
- | ^^^^^---^^^^^-----^^^
17
- | | |
18
- | | may need to be moved as well
19
- | may need to be moved as well
16
+ | ^^^^^^^^^^^^^^^^^^^^^
20
17
= note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration
21
18
= 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>
22
19
= note: `#[warn(non_local_definitions)]` on by default
@@ -33,10 +30,7 @@ help: move this `impl` block outside of the current static `A`
33
30
--> $DIR/consts.rs:24:5
34
31
|
35
32
LL | impl Uto2 for Test {}
36
- | ^^^^^----^^^^^----^^^
37
- | | |
38
- | | may need to be moved as well
39
- | may need to be moved as well
33
+ | ^^^^^^^^^^^^^^^^^^^^^
40
34
= note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration
41
35
= 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
36
@@ -52,10 +46,7 @@ help: move this `impl` block outside of the current constant `B`
52
46
--> $DIR/consts.rs:32:5
53
47
|
54
48
LL | impl Uto3 for Test {}
55
- | ^^^^^----^^^^^----^^^
56
- | | |
57
- | | may need to be moved as well
58
- | may need to be moved as well
49
+ | ^^^^^^^^^^^^^^^^^^^^^
59
50
= note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration
60
51
= 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
52
@@ -69,10 +60,7 @@ LL | impl Test {
69
60
help: move this `impl` block outside of the current function `main`
70
61
--> $DIR/consts.rs:43:5
71
62
|
72
- LL | impl Test {
73
- | ^ ---- may need to be moved as well
74
- | _____|
75
- | |
63
+ LL | / impl Test {
76
64
LL | |
77
65
LL | | fn foo() {}
78
66
LL | | }
@@ -89,10 +77,7 @@ LL | impl Test {
89
77
help: move this `impl` block outside of the current inline constant `<unnameable>` and up 2 bodies
90
78
--> $DIR/consts.rs:50:9
91
79
|
92
- LL | impl Test {
93
- | ^ ---- may need to be moved as well
94
- | _________|
95
- | |
80
+ LL | / impl Test {
96
81
LL | |
97
82
LL | | fn hoo() {}
98
83
LL | | }
@@ -109,10 +94,7 @@ LL | impl Test {
109
94
help: move this `impl` block outside of the current constant `_` and up 2 bodies
110
95
--> $DIR/consts.rs:59:9
111
96
|
112
- LL | impl Test {
113
- | ^ ---- may need to be moved as well
114
- | _________|
115
- | |
97
+ LL | / impl Test {
116
98
LL | |
117
99
LL | | fn foo2() {}
118
100
LL | | }
@@ -132,10 +114,7 @@ help: move this `impl` block outside of the current closure `<unnameable>` and u
132
114
--> $DIR/consts.rs:72:9
133
115
|
134
116
LL | impl Uto9 for Test {}
135
- | ^^^^^----^^^^^----^^^
136
- | | |
137
- | | may need to be moved as well
138
- | may need to be moved as well
117
+ | ^^^^^^^^^^^^^^^^^^^^^
139
118
= 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>
140
119
141
120
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
@@ -150,10 +129,7 @@ help: move this `impl` block outside of the current constant expression `<unname
150
129
--> $DIR/consts.rs:79:9
151
130
|
152
131
LL | impl Uto10 for Test {}
153
- | ^^^^^-----^^^^^----^^^
154
- | | |
155
- | | may need to be moved as well
156
- | may need to be moved as well
132
+ | ^^^^^^^^^^^^^^^^^^^^^^
157
133
= 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>
158
134
159
135
warning: 8 warnings emitted
0 commit comments