Remove feature gate test for `rustc_allow_const_fn_ptr`

This commit is contained in:
Dylan MacKenzie 2020-09-27 11:51:40 -07:00
parent 368502cc1d
commit 807260be9f
2 changed files with 0 additions and 47 deletions

View File

@ -1,14 +0,0 @@
#![feature(staged_api)]
#[stable(feature = "rust1", since = "1.0.0")]
const fn error(_: fn()) {}
//~^ ERROR `rustc_const_stable` or `rustc_const_unstable`
//~| ERROR `rustc_const_stable` or `rustc_const_unstable`
//~| ERROR function pointers
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(since="1.0.0", feature = "mep")]
const fn compiles(_: fn()) {}
//~^ ERROR function pointers
fn main() {}

View File

@ -1,33 +0,0 @@
error: stable const functions must have either `rustc_const_stable` or `rustc_const_unstable` attribute
--> $DIR/allow_const_fn_ptr_feature_gate.rs:4:1
|
LL | const fn error(_: fn()) {}
| ^^^^^^^^^^^^^^^^^^^^^^^
error: stable const functions must have either `rustc_const_stable` or `rustc_const_unstable` attribute
--> $DIR/allow_const_fn_ptr_feature_gate.rs:4:1
|
LL | const fn error(_: fn()) {}
| ^^^^^^^^^^^^^^^^^^^^^^^
error[E0658]: function pointers cannot appear in constant functions
--> $DIR/allow_const_fn_ptr_feature_gate.rs:4:16
|
LL | const fn error(_: fn()) {}
| ^
|
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
= help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
error[E0658]: function pointers cannot appear in constant functions
--> $DIR/allow_const_fn_ptr_feature_gate.rs:11:19
|
LL | const fn compiles(_: fn()) {}
| ^
|
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
= help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
error: aborting due to 4 previous errors
For more information about this error, try `rustc --explain E0658`.