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
Auto merge of #127377 - cuviper:beta-next, r=cuviper
[beta] backports
- Properly gate `safe` keyword in pre-expansion #126757
- Switch back `non_local_definitions` lint to allow-by-default #127015
- Stall computing instance for drop shim until it has no unsubstituted const params #127068
- Update LLVM submodule #127190
r? cuviper
warning: non-local `macro_rules!` definition, `#[macro_export]` macro should be written at top level module
2
-
--> $DIR/non_local_defs.rs:9:1
2
+
--> $DIR/non_local_defs.rs:11:1
3
3
|
4
4
LL | macro_rules! a_macro { () => {} }
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
6
|
7
7
= help: remove the `#[macro_export]` or make this doc-test a standalone test with its own `fn main() { ... }`
8
8
= note: a `macro_rules!` definition is non-local if it is nested inside an item and has a `#[macro_export]` attribute
9
9
= 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>
10
-
= note: `#[warn(non_local_definitions)]` on by default
error[E0658]: `unsafe extern {}` blocks and `safe` keyword are experimental
8
+
--> $DIR/feature-gate-unsafe-extern-blocks.rs:9:5
9
+
|
10
+
LL | safe fn foo();
11
+
| ^^^^
12
+
|
13
+
= note: see issue #123743 <https://github.com/rust-lang/rust/issues/123743> for more information
14
+
= help: add `#![feature(unsafe_extern_blocks)]` to the crate attributes to enable
15
+
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
16
+
17
+
error: aborting due to 2 previous errors
8
18
19
+
For more information about this error, try `rustc --explain E0658`.
= 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`
= 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>
32
36
33
37
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
34
-
--> $DIR/exhaustive-trait.rs:21:5
38
+
--> $DIR/exhaustive-trait.rs:23:5
35
39
|
36
40
LL | fn main() {
37
41
| --------- move the `impl` block outside of this function `main`
= 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>
48
52
49
53
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
50
-
--> $DIR/exhaustive-trait.rs:28:5
54
+
--> $DIR/exhaustive-trait.rs:30:5
51
55
|
52
56
LL | fn main() {
53
57
| --------- move the `impl` block outside of this function `main`
= 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>
64
68
65
69
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
66
-
--> $DIR/exhaustive-trait.rs:35:5
70
+
--> $DIR/exhaustive-trait.rs:37:5
67
71
|
68
72
LL | fn main() {
69
73
| --------- move the `impl` block outside of this function `main`
= 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>
80
84
81
85
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
82
-
--> $DIR/exhaustive-trait.rs:42:5
86
+
--> $DIR/exhaustive-trait.rs:44:5
83
87
|
84
88
LL | fn main() {
85
89
| --------- move the `impl` block outside of this function `main`
0 commit comments