rust/src/test/run-pass/static-assert.rs
Corey Richardson e64339645b Implement static_assert attribute
This verifies that a static item evaluates to true, at compile time.
2013-05-22 13:13:24 -04:00

15 lines
188 B
Rust

#[static_assert]
static b: bool = true;
#[static_assert]
static c: bool = 1 == 1;
#[static_assert]
static d: bool = 1 != 2;
#[static_assert]
static f: bool = (4/2) == 2;
fn main() {
}