switch allow_internal_unstable const fns to rustc_allow_const_fn_unstable

This commit is contained in:
Florian Warzecha 2020-10-21 20:54:20 +02:00
parent 3948b054dc
commit 05f4a9a42a
No known key found for this signature in database
GPG key ID: 4BE8C7D97F910C60
24 changed files with 81 additions and 39 deletions

View file

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

View file

@ -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

View file

@ -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() = || ();

View file

@ -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

View file

@ -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