rust/src/test/ui/intrinsics-always-extern.rs
Mark Rousskov 7b3adc289e Ban non-extern rust intrinsics
Intrinsics can only be defined by the compiler.
2019-09-14 11:47:02 -04:00

17 lines
282 B
Rust

#![feature(intrinsics)]
trait Foo {
extern "rust-intrinsic" fn foo(&self); //~ ERROR intrinsic must
}
impl Foo for () {
extern "rust-intrinsic" fn foo(&self) { //~ ERROR intrinsic must
}
}
extern "rust-intrinsic" fn hello() {//~ ERROR intrinsic must
}
fn main() {
}