Add -Z allow_features=... flag
This commit is contained in:
parent
fa8fd3daa7
commit
7c59ce9f5d
9 changed files with 85 additions and 4 deletions
10
src/test/ui/feature-gate/allow-features-empty.rs
Normal file
10
src/test/ui/feature-gate/allow-features-empty.rs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
// 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
|
||||
|
||||
fn main() {}
|
||||
21
src/test/ui/feature-gate/allow-features-empty.stderr
Normal file
21
src/test/ui/feature-gate/allow-features-empty.stderr
Normal file
|
|
@ -0,0 +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
|
||||
|
|
||||
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
|
||||
|
|
||||
LL | #![feature(lang_items)]
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0725`.
|
||||
10
src/test/ui/feature-gate/allow-features.rs
Normal file
10
src/test/ui/feature-gate/allow-features.rs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
// compile-flags: -Z allow_features=rustc_diagnostic_macros,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)]
|
||||
|
||||
fn main() {}
|
||||
9
src/test/ui/feature-gate/allow-features.stderr
Normal file
9
src/test/ui/feature-gate/allow-features.stderr
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
error[E0725]: the feature `rustc_const_unstable` is not in the list of allowed features
|
||||
--> $DIR/allow-features.rs:6:12
|
||||
|
|
||||
LL | #![feature(rustc_const_unstable)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0725`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue