]> git.proxmox.com Git - rustc.git/blob - tests/ui/consts/auxiliary/external_macro.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / consts / auxiliary / external_macro.rs
1 #![feature(allow_internal_unstable)]
2
3 // Macro to help ensure CONST_ERR lint errors
4 // are not silenced in external macros.
5 // https://github.com/rust-lang/rust/issues/65300
6
7 #[macro_export]
8 #[allow_internal_unstable(type_ascription)]
9 macro_rules! static_assert {
10 ($test:expr) => {
11 #[allow(dead_code)]
12 const _: () = [()][!($test: bool) as usize];
13 }
14 }