Add -Z allow_features=... flag

This commit is contained in:
Tyler Mandry 2019-03-13 16:29:24 -07:00
parent fa8fd3daa7
commit 7c59ce9f5d
9 changed files with 85 additions and 4 deletions

View 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() {}

View 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`.

View 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() {}

View 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`.