Test #[allow(unused)] on if
expression
This commit is contained in:
parent
f63b88c761
commit
e912d9d7ec
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…
Reference in New Issue
Block a user