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