We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ef2cbec + 65e6fdb commit 12f6a42Copy full SHA for 12f6a42
src/librustc_data_structures/macros.rs
@@ -11,11 +11,12 @@
11
/// A simple static assertion macro. The first argument should be a unique
12
/// ALL_CAPS identifier that describes the condition.
13
#[macro_export]
14
+#[allow_internal_unstable]
15
macro_rules! static_assert {
16
($name:ident: $test:expr) => {
17
// Use the bool to access an array such that if the bool is false, the access
18
// is out-of-bounds.
19
#[allow(dead_code)]
- static $name: () = [()][!$test as usize];
20
+ static $name: () = [()][!($test: bool) as usize];
21
}
22
0 commit comments