diff --git a/tests/const_fn.rs b/tests/const_fn.rs new file mode 100644 index 0000000000000..d9b41b8073c70 --- /dev/null +++ b/tests/const_fn.rs @@ -0,0 +1,3 @@ +#[cfg(target_os = "linux")] +const _FOO: libc::c_uint = unsafe { libc::CMSG_SPACE(1) }; +//^ if CMSG_SPACE is not const, this will fail to compile