2020-06-25 19:43:48 -05:00
|
|
|
// Don't allow unstable features in stable functions without `allow_internal_unstable`.
|
|
|
|
|
2020-05-21 14:49:38 -05:00
|
|
|
#![stable(feature = "rust1", since = "1.0.0")]
|
|
|
|
|
2020-01-10 20:48:52 -06:00
|
|
|
#![feature(staged_api)]
|
2020-06-25 19:43:48 -05:00
|
|
|
#![feature(const_transmute, const_fn)]
|
2020-01-10 20:48:52 -06:00
|
|
|
|
|
|
|
#[stable(feature = "rust1", since = "1.0.0")]
|
|
|
|
#[rustc_const_stable(feature = "rust1", since = "1.0.0")]
|
2020-06-25 19:43:48 -05:00
|
|
|
pub const fn foo() -> i32 {
|
2020-09-24 13:12:28 -05:00
|
|
|
unsafe { std::mem::transmute(4u32) } //~ ERROR `transmute`
|
2020-01-10 20:48:52 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|