fork/rust
git clone https://git.julia.blue/fork/rust
49cae55760d
1.44.0
1// run-rustfix 2#![allow(unused_variables)] 3#![allow(dead_code)] 4#![allow(unused_must_use)] 5 6fn foo() -> i32 { 7 ({2}) + {2} //~ ERROR expected expression, found `+` 8 //~^ ERROR mismatched types 9} 10 11fn bar() -> i32 { 12 ({2}) + 2 //~ ERROR expected expression, found `+` 13 //~^ ERROR mismatched types 14} 15 16fn zul() -> u32 { 17 let foo = 3; 18 ({ 42 }) + foo; //~ ERROR expected expression, found `+` 19 //~^ ERROR mismatched types 20 32 21} 22 23fn baz() -> i32 { 24 ({ 3 }) * 3 //~ ERROR type `{integer}` cannot be dereferenced 25 //~^ ERROR mismatched types 26} 27 28fn qux(a: Option<u32>, b: Option<u32>) -> bool { 29 (if let Some(x) = a { true } else { false }) 30 && //~ ERROR expected expression 31 if let Some(y) = a { true } else { false } 32} 33 34fn moo(x: u32) -> bool { 35 (match x { 36 _ => 1, 37 }) > 0 //~ ERROR expected expression 38} 39 40fn main() {}