Skip to content

Commit e912d9d

Browse files
committed
Test #[allow(unused)] on if expression
1 parent f63b88c commit e912d9d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// check-pass
2+
3+
fn main() {
4+
#[allow(unused_variables)]
5+
if true {
6+
let a = 1;
7+
} else if false {
8+
let b = 1;
9+
} else {
10+
let c = 1;
11+
}
12+
}

0 commit comments

Comments
 (0)