rust/tests/ui/closures/closure-return-type-mismatc...

18 lines
286 B
Rust

fn main() {
|| {
if false {
return "test";
}
let a = true;
a //~ ERROR mismatched types
};
|| -> bool {
if false {
return "hello" //~ ERROR mismatched types
};
let b = true;
b
};
}