mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
25 lines
669 B
Rust
25 lines
669 B
Rust
#![feature(intrinsics)]
|
|
#![feature(rustc_attrs)]
|
|
#![feature(effects)]
|
|
|
|
extern "rust-intrinsic" {
|
|
fn size_of<T>() -> usize; //~ ERROR intrinsic safety mismatch
|
|
//~^ ERROR intrinsic safety mismatch
|
|
}
|
|
|
|
#[rustc_intrinsic]
|
|
const fn assume(_b: bool) {} //~ ERROR intrinsic safety mismatch
|
|
//~| ERROR intrinsic has wrong type
|
|
|
|
#[rustc_intrinsic]
|
|
const fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize) {}
|
|
//~^ ERROR intrinsic safety mismatch
|
|
//~| ERROR intrinsic has wrong type
|
|
|
|
mod foo {
|
|
#[rustc_intrinsic]
|
|
unsafe fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize) {}
|
|
//~^ ERROR wrong number of const parameters
|
|
}
|
|
|
|
fn main() {}
|