Add run-pass test suggested by @joshtriplett
This commit is contained in:
parent
b00f6745c4
commit
e11cdfdae4
1 changed files with 15 additions and 0 deletions
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…
Add table
Add a link
Reference in a new issue