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