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-26 09:25:56 +08:00
fn foo() {
2022-08-28 12:11:57 +08:00
//~^ HELP try adding a return type
2022-08-26 09:25:56 +08:00
|x: &i32| 1i32
//~^ ERROR mismatched types
}
2022-08-28 12:11:57 +08:00
fn bar(i: impl Sized) {
//~^ HELP a return type might be missing here
|| i
//~^ ERROR mismatched types
}
2022-08-26 09:25:56 +08:00
fn main() {}