rust/src/test/ui/parser/recovery-attr-on-if.rs
2019-12-20 22:53:40 +01:00

10 lines
330 B
Rust

fn main() {
#[attr] if true {};
//~^ ERROR cannot find attribute
//~| ERROR attributes are not yet allowed on `if` expressions
#[attr] if true {};
//~^ ERROR cannot find attribute
//~| ERROR attributes are not yet allowed on `if` expressions
let _recovery_witness: () = 0; //~ ERROR mismatched types
}