2019-09-29 18:22:18 -05:00
|
|
|
#![feature(const_extern_fn)]
|
|
|
|
|
2020-09-01 16:28:11 -05:00
|
|
|
const extern "C" fn unsize(x: &[u8; 3]) -> &[u8] { x }
|
2019-09-29 18:22:18 -05:00
|
|
|
const unsafe extern "C" fn closure() -> fn() { || {} }
|
2020-09-01 16:28:11 -05:00
|
|
|
const unsafe extern "C" fn use_float() { 1.0 + 1.0; }
|
2020-09-23 13:58:41 -05:00
|
|
|
//~^ ERROR floating point arithmetic
|
2019-09-29 18:22:18 -05:00
|
|
|
const extern "C" fn ptr_cast(val: *const u8) { val as usize; }
|
2021-07-10 04:33:42 -05:00
|
|
|
//~^ ERROR pointers cannot be cast to integers
|
2019-09-29 18:22:18 -05:00
|
|
|
|
|
|
|
|
|
|
|
fn main() {}
|