Add run-pass test suggested by @joshtriplett
This commit is contained in:
parent
b00f6745c4
commit
e11cdfdae4
15
src/test/ui/parser/if-attrs/gate-whole-expr.rs
Normal file
15
src/test/ui/parser/if-attrs/gate-whole-expr.rs
Normal file
@ -0,0 +1,15 @@
|
||||
// run-pass
|
||||
|
||||
fn main() {
|
||||
let x = 1;
|
||||
|
||||
#[cfg(FALSE)]
|
||||
if false {
|
||||
x = 2;
|
||||
} else if true {
|
||||
x = 3;
|
||||
} else {
|
||||
x = 4;
|
||||
}
|
||||
assert_eq!(x, 1);
|
||||
}
|
Loading…
Reference in New Issue
Block a user