2024-07-07 11:18:35 +00:00
|
|
|
//@ revisions: stock effects
|
2022-09-27 07:22:07 +02:00
|
|
|
#![feature(intrinsics)]
|
|
|
|
#![feature(rustc_attrs)]
|
2024-07-07 11:18:35 +00:00
|
|
|
// as effects insert a const generic param to const intrinsics,
|
|
|
|
// check here that it doesn't report a const param mismatch either
|
|
|
|
// enabling or disabling effects.
|
|
|
|
#![cfg_attr(effects, feature(effects))]
|
|
|
|
#![allow(incomplete_features)]
|
2022-09-27 07:22:07 +02:00
|
|
|
|
|
|
|
extern "rust-intrinsic" {
|
|
|
|
fn size_of<T>() -> usize; //~ ERROR intrinsic safety mismatch
|
2023-10-31 13:45:26 +00:00
|
|
|
//~^ ERROR intrinsic safety mismatch
|
2022-09-27 07:22:07 +02:00
|
|
|
}
|
|
|
|
|
2024-02-16 17:45:46 +00:00
|
|
|
#[rustc_intrinsic]
|
|
|
|
const fn assume(_b: bool) {} //~ ERROR intrinsic safety mismatch
|
|
|
|
//~| ERROR intrinsic has wrong type
|
|
|
|
|
2024-02-02 15:07:10 +00: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) {}
|
2024-06-21 11:57:24 +00:00
|
|
|
// FIXME(effects) ~^ ERROR wrong number of const parameters
|
2024-02-02 15:07:10 +00:00
|
|
|
}
|
|
|
|
|
2022-09-27 07:22:07 +02:00
|
|
|
fn main() {}
|