rust/src/test/ui/reify-intrinsic.rs
2019-09-02 17:28:37 -04:00

16 lines
299 B
Rust

// check-fail
#![feature(intrinsics)]
fn a() {
let _: unsafe extern "rust-intrinsic" fn(isize) -> usize = std::mem::transmute;
//~^ ERROR cannot coerce
}
fn b() {
let _ = std::mem::transmute as unsafe extern "rust-intrinsic" fn(isize) -> usize;
//~^ ERROR casting
}
fn main() {}