blob: 3b3a2950942d0bb8640e986c7a4f9292a5b72489 [file] [log] [blame]
// Don't allow unstable features in stable functions without `allow_internal_unstable`.
#![stable(feature = "rust1", since = "1.0.0")]
#![feature(staged_api)]
#![feature(const_transmute, const_fn)]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "rust1", since = "1.0.0")]
pub const fn foo() -> i32 {
unsafe { std::mem::transmute(4u32) } //~ ERROR is not stable as `const fn`
}
fn main() {}