mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
15 lines
375 B
Rust
15 lines
375 B
Rust
#![feature(allow_internal_unstable)]
|
|
|
|
// Macro to help ensure CONST_ERR lint errors
|
|
// are not silenced in external macros.
|
|
// https://github.com/rust-lang/rust/issues/65300
|
|
|
|
#[macro_export]
|
|
#[allow_internal_unstable(type_ascription)]
|
|
macro_rules! static_assert {
|
|
($test:expr) => {
|
|
#[allow(dead_code)]
|
|
const _: () = [()][!($test: bool) as usize];
|
|
}
|
|
}
|