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
[beta] backports
- Properly gate `safe` keyword in pre-expansion rust-lang#126757
- Switch back `non_local_definitions` lint to allow-by-default rust-lang#127015
- Stall computing instance for drop shim until it has no unsubstituted const params rust-lang#127068
- Update LLVM submodule rust-lang#127190
r? cuviper
= 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`
14
14
= note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration
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
-
= note: `#[warn(non_local_definitions)]` on by default
16
+
note: the lint level is defined here
17
+
--> $DIR/cargo-update.rs:13:9
18
+
|
19
+
LL | #![warn(non_local_definitions)]
20
+
| ^^^^^^^^^^^^^^^^^^^^^
17
21
= 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
+13-9
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
2
-
--> $DIR/consts.rs:13:5
2
+
--> $DIR/consts.rs:15:5
3
3
|
4
4
LL | const Z: () = {
5
5
| -----------
@@ -17,10 +17,14 @@ LL | impl Uto for &Test {}
17
17
= 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`
18
18
= note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration
19
19
= 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
-
= note: `#[warn(non_local_definitions)]` on by default
20
+
note: the lint level is defined here
21
+
--> $DIR/consts.rs:5:9
22
+
|
23
+
LL | #![warn(non_local_definitions)]
24
+
| ^^^^^^^^^^^^^^^^^^^^^
21
25
22
26
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
23
-
--> $DIR/consts.rs:24:5
27
+
--> $DIR/consts.rs:26:5
24
28
|
25
29
LL | static A: u32 = {
26
30
| ------------- move the `impl` block outside of this static `A`
@@ -36,7 +40,7 @@ LL | impl Uto2 for Test {}
36
40
= 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
41
38
42
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
39
-
--> $DIR/consts.rs:32:5
43
+
--> $DIR/consts.rs:34:5
40
44
|
41
45
LL | const B: u32 = {
42
46
| ------------ move the `impl` block outside of this constant `B`
@@ -52,7 +56,7 @@ LL | impl Uto3 for Test {}
52
56
= 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
57
54
58
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
55
-
--> $DIR/consts.rs:43:5
59
+
--> $DIR/consts.rs:45:5
56
60
|
57
61
LL | fn main() {
58
62
| --------- move the `impl` block outside of this function `main`
@@ -65,7 +69,7 @@ LL | impl Test {
65
69
= 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
70
67
71
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
68
-
--> $DIR/consts.rs:50:9
72
+
--> $DIR/consts.rs:52:9
69
73
|
70
74
LL | const {
71
75
| ___________-
@@ -84,7 +88,7 @@ LL | | };
84
88
= 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>
85
89
86
90
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
87
-
--> $DIR/consts.rs:59:9
91
+
--> $DIR/consts.rs:61:9
88
92
|
89
93
LL | const _: u32 = {
90
94
| ------------ move the `impl` block outside of this constant `_` and up 2 bodies
@@ -98,7 +102,7 @@ LL | impl Test {
98
102
= 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>
99
103
100
104
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
101
-
--> $DIR/consts.rs:72:9
105
+
--> $DIR/consts.rs:74:9
102
106
|
103
107
LL | let _a = || {
104
108
| -- move the `impl` block outside of this closure `<unnameable>` and up 2 bodies
@@ -113,7 +117,7 @@ LL | impl Uto9 for Test {}
113
117
= 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>
114
118
115
119
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
Copy file name to clipboardexpand all lines: tests/ui/lint/non-local-defs/exhaustive-trait.stderr
+11-7
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
2
-
--> $DIR/exhaustive-trait.rs:7:5
2
+
--> $DIR/exhaustive-trait.rs:9:5
3
3
|
4
4
LL | fn main() {
5
5
| --------- move the `impl` block outside of this function `main`
@@ -12,10 +12,14 @@ LL | impl PartialEq<()> for Dog {
12
12
= 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
13
= 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`
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
-
= note: `#[warn(non_local_definitions)]` on by default
15
+
note: the lint level is defined here
16
+
--> $DIR/exhaustive-trait.rs:4:9
17
+
|
18
+
LL | #![warn(non_local_definitions)]
19
+
| ^^^^^^^^^^^^^^^^^^^^^
16
20
17
21
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
18
-
--> $DIR/exhaustive-trait.rs:14:5
22
+
--> $DIR/exhaustive-trait.rs:16:5
19
23
|
20
24
LL | fn main() {
21
25
| --------- move the `impl` block outside of this function `main`
0 commit comments