2022-09-27 00:22:07 -05:00
|
|
|
#![feature(intrinsics)]
|
|
|
|
#![feature(rustc_attrs)]
|
|
|
|
|
|
|
|
extern "rust-intrinsic" {
|
|
|
|
fn size_of<T>() -> usize; //~ ERROR intrinsic safety mismatch
|
2023-10-31 08:45:26 -05:00
|
|
|
//~^ ERROR intrinsic safety mismatch
|
2022-09-27 00:22:07 -05:00
|
|
|
}
|
|
|
|
|
2024-02-16 11:45:46 -06:00
|
|
|
#[rustc_intrinsic]
|
|
|
|
const fn assume(_b: bool) {} //~ ERROR intrinsic safety mismatch
|
|
|
|
//~| ERROR intrinsic has wrong type
|
|
|
|
|
2024-02-02 09:07:10 -06:00
|
|
|
#[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) {}
|
|
|
|
}
|
|
|
|
|
2022-09-27 00:22:07 -05:00
|
|
|
fn main() {}
|