Test #[allow(unused)] on if expression
This commit is contained in:
parent
f63b88c761
commit
e912d9d7ec
1 changed files with 12 additions and 0 deletions
12
src/test/ui/parser/if-attrs/builtin-if-attr.rs
Normal file
12
src/test/ui/parser/if-attrs/builtin-if-attr.rs
Normal file
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue