mirror of
https://github.com/rust-lang/rust.git
synced 2025-09-28 21:55:31 +00:00
13 lines
334 B
Rust
13 lines
334 B
Rust
// Check we error before unsupported ABIs reach codegen stages.
|
|
|
|
//@ edition: 2018
|
|
//@ compile-flags: --crate-type=lib
|
|
#![feature(rustc_attrs)]
|
|
|
|
use core::mem;
|
|
|
|
fn anything() {
|
|
let a = unsafe { mem::transmute::<usize, extern "rust-invalid" fn(i32)>(4) }(2);
|
|
//~^ ERROR: is not a supported ABI for the current target [E0570]
|
|
}
|