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
Rollup merge of #143929 - petrochenkov:depresolve, r=lcnr
Mark all deprecation lints in name resolution as deny-by-default and report-in-deps
This affects the next lints:
- `MACRO_EXPANDED_MACRO_EXPORTS_ACCESSED_BY_ABSOLUTE_PATHS` - #144408
- `LEGACY_DERIVE_HELPERS` - #79202
- `PRIVATE_MACRO_USE` - #120192
- `OUT_OF_SCOPE_MACRO_CALLS` - #144406
Copy file name to clipboardExpand all lines: tests/ui/attributes/key-value-expansion-scope.stderr
+80-8Lines changed: 80 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -126,7 +126,7 @@ LL | #![doc = in_block!()]
126
126
|
127
127
= help: have you added the `#[macro_use]` on the module/import?
128
128
129
-
warning: cannot find macro `in_root` in the current scope when looking from the crate root
129
+
error: cannot find macro `in_root` in the current scope when looking from the crate root
130
130
--> $DIR/key-value-expansion-scope.rs:1:10
131
131
|
132
132
LL | #![doc = in_root!()]
@@ -135,9 +135,9 @@ LL | #![doc = in_root!()]
135
135
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
136
136
= note: for more information, see issue #124535 <https://github.com/rust-lang/rust/issues/124535>
137
137
= help: import `macro_rules` with `use` to make it callable above its definition
138
-
= note: `#[warn(out_of_scope_macro_calls)]` on by default
138
+
= note: `#[deny(out_of_scope_macro_calls)]` on by default
139
139
140
-
warning: cannot find macro `in_mod_escape` in the current scope when looking from the crate root
140
+
error: cannot find macro `in_mod_escape` in the current scope when looking from the crate root
= note: for more information, see issue #124535 <https://github.com/rust-lang/rust/issues/124535>
148
148
= help: import `macro_rules` with `use` to make it callable above its definition
149
149
150
-
warning: cannot find macro `in_mod` in the current scope when looking from module `macros_stay`
150
+
error: cannot find macro `in_mod` in the current scope when looking from module `macros_stay`
151
151
--> $DIR/key-value-expansion-scope.rs:21:9
152
152
|
153
153
LL | #[doc = in_mod!()]
@@ -157,7 +157,7 @@ LL | #[doc = in_mod!()]
157
157
= note: for more information, see issue #124535 <https://github.com/rust-lang/rust/issues/124535>
158
158
= help: import `macro_rules` with `use` to make it callable above its definition
159
159
160
-
warning: cannot find macro `in_mod` in the current scope when looking from module `macros_stay`
160
+
error: cannot find macro `in_mod` in the current scope when looking from module `macros_stay`
161
161
--> $DIR/key-value-expansion-scope.rs:24:14
162
162
|
163
163
LL | #![doc = in_mod!()]
@@ -167,7 +167,7 @@ LL | #![doc = in_mod!()]
167
167
= note: for more information, see issue #124535 <https://github.com/rust-lang/rust/issues/124535>
168
168
= help: import `macro_rules` with `use` to make it callable above its definition
169
169
170
-
warning: cannot find macro `in_mod_escape` in the current scope when looking from module `macros_escape`
170
+
error: cannot find macro `in_mod_escape` in the current scope when looking from module `macros_escape`
= note: for more information, see issue #124535 <https://github.com/rust-lang/rust/issues/124535>
178
178
= help: import `macro_rules` with `use` to make it callable above its definition
179
179
180
-
warning: cannot find macro `in_mod_escape` in the current scope when looking from module `macros_escape`
180
+
error: cannot find macro `in_mod_escape` in the current scope when looking from module `macros_escape`
= note: for more information, see issue #124535 <https://github.com/rust-lang/rust/issues/124535>
188
188
= help: import `macro_rules` with `use` to make it callable above its definition
189
189
190
-
error: aborting due to 16 previous errors; 6 warnings emitted
error: cannot find macro `in_root` in the current scope when looking from the crate root
194
+
--> $DIR/key-value-expansion-scope.rs:1:10
195
+
|
196
+
LL | #![doc = in_root!()]
197
+
| ^^^^^^^ not found from the crate root
198
+
|
199
+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
200
+
= note: for more information, see issue #124535 <https://github.com/rust-lang/rust/issues/124535>
201
+
= help: import `macro_rules` with `use` to make it callable above its definition
202
+
= note: `#[deny(out_of_scope_macro_calls)]` on by default
203
+
204
+
Future breakage diagnostic:
205
+
error: cannot find macro `in_mod_escape` in the current scope when looking from the crate root
206
+
--> $DIR/key-value-expansion-scope.rs:4:10
207
+
|
208
+
LL | #![doc = in_mod_escape!()]
209
+
| ^^^^^^^^^^^^^ not found from the crate root
210
+
|
211
+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
212
+
= note: for more information, see issue #124535 <https://github.com/rust-lang/rust/issues/124535>
213
+
= help: import `macro_rules` with `use` to make it callable above its definition
214
+
= note: `#[deny(out_of_scope_macro_calls)]` on by default
215
+
216
+
Future breakage diagnostic:
217
+
error: cannot find macro `in_mod` in the current scope when looking from module `macros_stay`
218
+
--> $DIR/key-value-expansion-scope.rs:21:9
219
+
|
220
+
LL | #[doc = in_mod!()]
221
+
| ^^^^^^ not found from module `macros_stay`
222
+
|
223
+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
224
+
= note: for more information, see issue #124535 <https://github.com/rust-lang/rust/issues/124535>
225
+
= help: import `macro_rules` with `use` to make it callable above its definition
226
+
= note: `#[deny(out_of_scope_macro_calls)]` on by default
227
+
228
+
Future breakage diagnostic:
229
+
error: cannot find macro `in_mod` in the current scope when looking from module `macros_stay`
230
+
--> $DIR/key-value-expansion-scope.rs:24:14
231
+
|
232
+
LL | #![doc = in_mod!()]
233
+
| ^^^^^^ not found from module `macros_stay`
234
+
|
235
+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
236
+
= note: for more information, see issue #124535 <https://github.com/rust-lang/rust/issues/124535>
237
+
= help: import `macro_rules` with `use` to make it callable above its definition
238
+
= note: `#[deny(out_of_scope_macro_calls)]` on by default
239
+
240
+
Future breakage diagnostic:
241
+
error: cannot find macro `in_mod_escape` in the current scope when looking from module `macros_escape`
242
+
--> $DIR/key-value-expansion-scope.rs:36:9
243
+
|
244
+
LL | #[doc = in_mod_escape!()]
245
+
| ^^^^^^^^^^^^^ not found from module `macros_escape`
246
+
|
247
+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
248
+
= note: for more information, see issue #124535 <https://github.com/rust-lang/rust/issues/124535>
249
+
= help: import `macro_rules` with `use` to make it callable above its definition
250
+
= note: `#[deny(out_of_scope_macro_calls)]` on by default
251
+
252
+
Future breakage diagnostic:
253
+
error: cannot find macro `in_mod_escape` in the current scope when looking from module `macros_escape`
254
+
--> $DIR/key-value-expansion-scope.rs:39:14
255
+
|
256
+
LL | #![doc = in_mod_escape!()]
257
+
| ^^^^^^^^^^^^^ not found from module `macros_escape`
258
+
|
259
+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
260
+
= note: for more information, see issue #124535 <https://github.com/rust-lang/rust/issues/124535>
261
+
= help: import `macro_rules` with `use` to make it callable above its definition
262
+
= note: `#[deny(out_of_scope_macro_calls)]` on by default
Copy file name to clipboardExpand all lines: tests/ui/extern/issue-80074.stderr
+14-3Lines changed: 14 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -16,16 +16,27 @@ error: cannot find macro `m` in this scope
16
16
LL | m!();
17
17
| ^
18
18
19
-
warning: macro `foo` is private
19
+
error: macro `foo` is private
20
20
--> $DIR/issue-80074.rs:13:5
21
21
|
22
22
LL | foo!();
23
23
| ^^^
24
24
|
25
25
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
26
26
= note: for more information, see issue #120192 <https://github.com/rust-lang/rust/issues/120192>
27
-
= note: `#[warn(private_macro_use)]` on by default
27
+
= note: `#[deny(private_macro_use)]` on by default
28
28
29
-
error: aborting due to 3 previous errors; 1 warning emitted
29
+
error: aborting due to 4 previous errors
30
30
31
31
For more information about this error, try `rustc --explain E0469`.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
40
+
= note: for more information, see issue #120192 <https://github.com/rust-lang/rust/issues/120192>
41
+
= note: `#[deny(private_macro_use)]` on by default
error: macro-expanded `macro_export` macros from the current crate cannot be referred to by absolute paths
46
+
--> $DIR/local-modularized-tricky-fail-2.rs:13:9
47
+
|
48
+
LL | use crate::exported;
49
+
| ^^^^^^^^^^^^^^^
50
+
|
51
+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
52
+
= note: for more information, see issue #52234 <https://github.com/rust-lang/rust/issues/52234>
53
+
note: the macro is defined here
54
+
--> $DIR/local-modularized-tricky-fail-2.rs:5:5
55
+
|
56
+
LL | / macro_rules! exported {
57
+
LL | | () => ()
58
+
LL | | }
59
+
| |_____^
60
+
...
61
+
LL | define_exported!();
62
+
| ------------------ in this macro invocation
63
+
= note: `#[deny(macro_expanded_macro_exports_accessed_by_absolute_paths)]` on by default
64
+
= note: this error originates in the macro `define_exported` (in Nightly builds, run with -Z macro-backtrace for more info)
65
+
66
+
Future breakage diagnostic:
67
+
error: macro-expanded `macro_export` macros from the current crate cannot be referred to by absolute paths
68
+
--> $DIR/local-modularized-tricky-fail-2.rs:19:5
69
+
|
70
+
LL | crate::exported!();
71
+
| ^^^^^^^^^^^^^^^
72
+
|
73
+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
74
+
= note: for more information, see issue #52234 <https://github.com/rust-lang/rust/issues/52234>
75
+
note: the macro is defined here
76
+
--> $DIR/local-modularized-tricky-fail-2.rs:5:5
77
+
|
78
+
LL | / macro_rules! exported {
79
+
LL | | () => ()
80
+
LL | | }
81
+
| |_____^
82
+
...
83
+
LL | define_exported!();
84
+
| ------------------ in this macro invocation
85
+
= note: `#[deny(macro_expanded_macro_exports_accessed_by_absolute_paths)]` on by default
86
+
= note: this error originates in the macro `define_exported` (in Nightly builds, run with -Z macro-backtrace for more info)
Copy file name to clipboardExpand all lines: tests/ui/proc-macro/derive-helper-shadowing.stderr
+17-3Lines changed: 17 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,7 @@ LL | use test_macros::empty_attr as empty_helper;
58
58
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
59
59
= help: use `crate::empty_helper` to refer to this attribute macro unambiguously
60
60
61
-
warning: derive helper attribute is used before it is introduced
61
+
error: derive helper attribute is used before it is introduced
62
62
--> $DIR/derive-helper-shadowing.rs:19:3
63
63
|
64
64
LL | #[empty_helper]
@@ -69,8 +69,22 @@ LL | #[derive(Empty)]
69
69
|
70
70
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
71
71
= note: for more information, see issue #79202 <https://github.com/rust-lang/rust/issues/79202>
72
-
= note: `#[warn(legacy_derive_helpers)]` on by default
72
+
= note: `#[deny(legacy_derive_helpers)]` on by default
73
73
74
-
error: aborting due to 4 previous errors; 1 warning emitted
74
+
error: aborting due to 5 previous errors
75
75
76
76
For more information about this error, try `rustc --explain E0659`.
error: derive helper attribute is used before it is introduced
79
+
--> $DIR/derive-helper-shadowing.rs:19:3
80
+
|
81
+
LL | #[empty_helper]
82
+
| ^^^^^^^^^^^^
83
+
...
84
+
LL | #[derive(Empty)]
85
+
| ----- the attribute is introduced here
86
+
|
87
+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
88
+
= note: for more information, see issue #79202 <https://github.com/rust-lang/rust/issues/79202>
89
+
= note: `#[deny(legacy_derive_helpers)]` on by default
0 commit comments