Skip to content

Commit

Permalink
Test #[allow(unused)] on if expression
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron1011 committed Mar 4, 2020
1 parent f63b88c commit e912d9d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/test/ui/parser/if-attrs/builtin-if-attr.rs
@@ -0,0 +1,12 @@
// check-pass

fn main() {
#[allow(unused_variables)]
if true {
let a = 1;
} else if false {
let b = 1;
} else {
let c = 1;
}
}

0 comments on commit e912d9d

Please sign in to comment.