]>
Commit | Line | Data |
---|---|---|
e74abb32 XL |
1 | #![feature(const_extern_fn)] |
2 | ||
3 | const extern fn unsize(x: &[u8; 3]) -> &[u8] { x } | |
e74abb32 | 4 | const unsafe extern "C" fn closure() -> fn() { || {} } |
1b1a35ee XL |
5 | //~^ ERROR function pointer |
6 | //~| ERROR function pointer cast | |
e74abb32 | 7 | const unsafe extern fn use_float() { 1.0 + 1.0; } |
1b1a35ee | 8 | //~^ ERROR floating point arithmetic |
e74abb32 | 9 | const extern "C" fn ptr_cast(val: *const u8) { val as usize; } |
1b1a35ee | 10 | //~^ ERROR casting pointers to integers |
e74abb32 XL |
11 | |
12 | ||
13 | fn main() {} |