rust/tests/ui/suggestions/return-closures.rs

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

14 lines
235 B
Rust
Raw Normal View History

2022-08-25 20:25:56 -05:00
fn foo() {
2022-08-27 23:11:57 -05:00
//~^ HELP try adding a return type
2022-08-25 20:25:56 -05:00
|x: &i32| 1i32
//~^ ERROR mismatched types
}
2022-08-27 23:11:57 -05:00
fn bar(i: impl Sized) {
//~^ HELP a return type might be missing here
|| i
//~^ ERROR mismatched types
}
2022-08-25 20:25:56 -05:00
fn main() {}