switch allow_internal_unstable const fns to rustc_allow_const_fn_unstable
This commit is contained in:
parent
3948b054dc
commit
05f4a9a42a
24 changed files with 81 additions and 39 deletions
|
|
@ -1,4 +1,4 @@
|
|||
#![feature(rustc_attrs, staged_api, allow_internal_unstable)]
|
||||
#![feature(rustc_attrs, staged_api, rustc_allow_const_fn_unstable)]
|
||||
#![feature(const_fn_fn_ptr_basics)]
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
|
@ -8,7 +8,7 @@ const fn error(_: fn()) {}
|
|||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_const_stable(since="1.0.0", feature = "mep")]
|
||||
#[allow_internal_unstable(const_fn_fn_ptr_basics)]
|
||||
#[rustc_allow_const_fn_unstable(const_fn_fn_ptr_basics)]
|
||||
const fn compiles(_: fn()) {}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ help: if it is not part of the public API, make this function unstably const
|
|||
|
|
||||
LL | #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
|
|
||||
help: otherwise `#[allow_internal_unstable]` can be used to bypass stability checks
|
||||
help: otherwise `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks
|
||||
|
|
||||
LL | #[allow_internal_unstable(const_fn_fn_ptr_basics)]
|
||||
LL | #[rustc_allow_const_fn_unstable(const_fn_fn_ptr_basics)]
|
||||
|
|
||||
|
||||
error: aborting due to previous error
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// run-pass
|
||||
#![feature(allow_internal_unstable)]
|
||||
#![feature(rustc_allow_const_fn_unstable)]
|
||||
#![feature(const_fn_fn_ptr_basics)]
|
||||
|
||||
#![feature(rustc_attrs, staged_api)]
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_const_stable(since="1.0.0", feature = "mep")]
|
||||
#[allow_internal_unstable(const_fn_fn_ptr_basics)]
|
||||
#[rustc_allow_const_fn_unstable(const_fn_fn_ptr_basics)]
|
||||
const fn takes_fn_ptr(_: fn()) {}
|
||||
|
||||
const FN: fn() = || ();
|
||||
|
|
|
|||
|
|
@ -24,9 +24,9 @@ help: if it is not part of the public API, make this function unstably const
|
|||
|
|
||||
LL | #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
|
|
||||
help: otherwise `#[allow_internal_unstable]` can be used to bypass stability checks
|
||||
help: otherwise `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks
|
||||
|
|
||||
LL | #[allow_internal_unstable(const_fn_floating_point_arithmetic)]
|
||||
LL | #[rustc_allow_const_fn_unstable(const_fn_floating_point_arithmetic)]
|
||||
|
|
||||
|
||||
error: `foo2_gated` is not yet stable as a const fn
|
||||
|
|
|
|||
|
|
@ -24,9 +24,9 @@ help: if it is not part of the public API, make this function unstably const
|
|||
|
|
||||
LL | #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
|
|
||||
help: otherwise `#[allow_internal_unstable]` can be used to bypass stability checks
|
||||
help: otherwise `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks
|
||||
|
|
||||
LL | #[allow_internal_unstable(const_fn_floating_point_arithmetic)]
|
||||
LL | #[rustc_allow_const_fn_unstable(const_fn_floating_point_arithmetic)]
|
||||
|
|
||||
|
||||
error: `foo2_gated` is not yet stable as a const fn
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue