diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
commit | 64d98f8ee037282c35007b64c2649055c56af1db (patch) | |
tree | 5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /src/test/ui/consts/min_const_fn/min_const_fn_libstd_stability.rs | |
parent | Adding debian version 1.67.1+dfsg1-1. (diff) | |
download | rustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/consts/min_const_fn/min_const_fn_libstd_stability.rs')
-rw-r--r-- | src/test/ui/consts/min_const_fn/min_const_fn_libstd_stability.rs | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/src/test/ui/consts/min_const_fn/min_const_fn_libstd_stability.rs b/src/test/ui/consts/min_const_fn/min_const_fn_libstd_stability.rs deleted file mode 100644 index bb240fb4a..000000000 --- a/src/test/ui/consts/min_const_fn/min_const_fn_libstd_stability.rs +++ /dev/null @@ -1,41 +0,0 @@ -#![unstable(feature = "humans", - reason = "who ever let humans program computers, - we're apparently really bad at it", - issue = "none")] - -#![feature(const_fn_floating_point_arithmetic, foo, foo2)] -#![feature(staged_api)] - -#[stable(feature = "rust1", since = "1.0.0")] -#[rustc_const_unstable(feature="foo", issue = "none")] -const fn foo() -> u32 { 42 } - -#[stable(feature = "rust1", since = "1.0.0")] -#[rustc_const_stable(feature = "rust1", since = "1.0.0")] -// can't call non-min_const_fn -const fn bar() -> u32 { foo() } //~ ERROR not yet stable as a const fn - -#[unstable(feature = "foo2", issue = "none")] -const fn foo2() -> u32 { 42 } - -#[stable(feature = "rust1", since = "1.0.0")] -#[rustc_const_stable(feature = "rust1", since = "1.0.0")] -// can't call non-min_const_fn -const fn bar2() -> u32 { foo2() } //~ ERROR not yet stable as a const fn - -#[stable(feature = "rust1", since = "1.0.0")] -#[rustc_const_stable(feature = "rust1", since = "1.0.0")] -// Const-stable functions cannot rely on unstable const-eval features. -const fn bar3() -> u32 { (5f32 + 6f32) as u32 } -//~^ ERROR const-stable function cannot use `#[feature(const_fn_floating_point_arithmetic)]` - -// check whether this function cannot be called even with the feature gate active -#[unstable(feature = "foo2", issue = "none")] -const fn foo2_gated() -> u32 { 42 } - -#[stable(feature = "rust1", since = "1.0.0")] -#[rustc_const_stable(feature = "rust1", since = "1.0.0")] -// can't call non-min_const_fn -const fn bar2_gated() -> u32 { foo2_gated() } //~ ERROR not yet stable as a const fn - -fn main() {} |