Closed
Description
I expected this code to compile, but it does not:
#![feature(staged_api, f128)]
#![stable(feature = "rust_test", since = "1.0.0")]
#[unstable(feature = "f128", issue = "42")]
#[rustc_const_unstable(feature = "f128", issue = "42")]
const fn my_fun() {}
#[unstable(feature = "f128", issue = "42")]
#[rustc_const_unstable(feature = "f128", issue = "42")]
const fn my_fun2() {
my_fun()
}
Renaming f128
to f128_const
makes it compile, so somehow the issue must be related to the fact that f128
is a language feature gate. For regular library stability, we support also using a language feature as a library feature gate, but for const-stability that somehow does not work.
When this gets fixed, the f128_const and f16_const features (added in #129555) can be merged into the f128 and f16 features, respectively.
Cc @oli-obk