mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
936b666c4a
Give some intrinsics fallback bodies cc #93145
23 lines
496 B
Rust
23 lines
496 B
Rust
//@ check-fail
|
|
|
|
#![feature(core_intrinsics, 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 c() {
|
|
let _: [unsafe extern "rust-intrinsic" fn(bool) -> bool; 2] = [
|
|
std::intrinsics::likely, //~ ERROR cannot coerce
|
|
std::intrinsics::unlikely,
|
|
];
|
|
}
|
|
|
|
fn main() {}
|