rust/tests/ui/closures/old-closure-expression-remove-semicolon.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
187 B
Rust
Raw Normal View History

2020-07-02 00:32:12 -05:00
// run-rustfix
2019-02-25 17:56:53 -06:00
fn foo() -> i32 {
2020-07-02 00:32:12 -05:00
0
2019-02-25 17:56:53 -06:00
}
fn main() {
2020-07-02 00:32:12 -05:00
let _x: i32 = {
2019-02-25 17:56:53 -06:00
//~^ ERROR mismatched types
foo(); //~ HELP remove this semicolon to return this value
2019-02-25 17:56:53 -06:00
};
}