Rollup merge of #64139 - Mark-Simulacrum:strip-legacy-proc-macro, r=petrochenkov
Migrate internal diagnostic registration to macro_rules Review is best done commit-by-commit. Fixes #64132.
This commit is contained in:
commit
89a69fd76d
49 changed files with 176 additions and 489 deletions
|
|
@ -1,8 +1,6 @@
|
|||
// compile-flags: -Z allow_features=
|
||||
// Note: This test uses rustc internal flags because they will never stabilize.
|
||||
|
||||
#![feature(rustc_diagnostic_macros)] //~ ERROR
|
||||
|
||||
#![feature(rustc_const_unstable)] //~ ERROR
|
||||
|
||||
#![feature(lang_items)] //~ ERROR
|
||||
|
|
|
|||
|
|
@ -1,27 +1,21 @@
|
|||
error[E0725]: the feature `rustc_diagnostic_macros` is not in the list of allowed features
|
||||
--> $DIR/allow-features-empty.rs:4:12
|
||||
|
|
||||
LL | #![feature(rustc_diagnostic_macros)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0725]: the feature `rustc_const_unstable` is not in the list of allowed features
|
||||
--> $DIR/allow-features-empty.rs:6:12
|
||||
--> $DIR/allow-features-empty.rs:4:12
|
||||
|
|
||||
LL | #![feature(rustc_const_unstable)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0725]: the feature `lang_items` is not in the list of allowed features
|
||||
--> $DIR/allow-features-empty.rs:8:12
|
||||
--> $DIR/allow-features-empty.rs:6:12
|
||||
|
|
||||
LL | #![feature(lang_items)]
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error[E0725]: the feature `unknown_stdlib_feature` is not in the list of allowed features
|
||||
--> $DIR/allow-features-empty.rs:10:12
|
||||
--> $DIR/allow-features-empty.rs:8:12
|
||||
|
|
||||
LL | #![feature(unknown_stdlib_feature)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0725`.
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
// compile-flags: -Z allow_features=rustc_diagnostic_macros,lang_items
|
||||
// compile-flags: -Z allow_features=lang_items
|
||||
// Note: This test uses rustc internal flags because they will never stabilize.
|
||||
|
||||
#![feature(rustc_diagnostic_macros)]
|
||||
|
||||
#![feature(rustc_const_unstable)] //~ ERROR
|
||||
|
||||
#![feature(lang_items)]
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
error[E0725]: the feature `rustc_const_unstable` is not in the list of allowed features
|
||||
--> $DIR/allow-features.rs:6:12
|
||||
--> $DIR/allow-features.rs:4:12
|
||||
|
|
||||
LL | #![feature(rustc_const_unstable)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0725]: the feature `unknown_stdlib_feature` is not in the list of allowed features
|
||||
--> $DIR/allow-features.rs:10:12
|
||||
--> $DIR/allow-features.rs:8:12
|
||||
|
|
||||
LL | #![feature(unknown_stdlib_feature)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
// Test that diagnostic macros are gated by `rustc_diagnostic_macros` feature
|
||||
// gate
|
||||
|
||||
__register_diagnostic!(E0001);
|
||||
//~^ ERROR cannot find macro `__register_diagnostic!` in this scope
|
||||
|
||||
fn main() {
|
||||
__diagnostic_used!(E0001);
|
||||
//~^ ERROR cannot find macro `__diagnostic_used!` in this scope
|
||||
}
|
||||
|
||||
__build_diagnostic_array!(DIAGNOSTICS);
|
||||
//~^ ERROR cannot find macro `__build_diagnostic_array!` in this scope
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
error: cannot find macro `__build_diagnostic_array!` in this scope
|
||||
--> $DIR/feature-gate-rustc-diagnostic-macros.rs:12:1
|
||||
|
|
||||
LL | __build_diagnostic_array!(DIAGNOSTICS);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: cannot find macro `__diagnostic_used!` in this scope
|
||||
--> $DIR/feature-gate-rustc-diagnostic-macros.rs:8:5
|
||||
|
|
||||
LL | __diagnostic_used!(E0001);
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: cannot find macro `__register_diagnostic!` in this scope
|
||||
--> $DIR/feature-gate-rustc-diagnostic-macros.rs:4:1
|
||||
|
|
||||
LL | __register_diagnostic!(E0001);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue