blob: c7078e46fa64fc21d694d602ad988df91cc790c0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
#![feature(const_extern_fn)]
const extern "C" fn unsize(x: &[u8; 3]) -> &[u8] { x }
const unsafe extern "C" fn closure() -> fn() { || {} }
const unsafe extern "C" fn use_float() { 1.0 + 1.0; }
//~^ ERROR floating point arithmetic
const extern "C" fn ptr_cast(val: *const u8) { val as usize; }
//~^ ERROR pointers cannot be cast to integers
fn main() {}
|