rust/tests/ui/closures/issue-84128.rs

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

17 lines
300 B
Rust
Raw Normal View History

// test for issue 84128
// missing suggestion for similar ADT type with diffetent generic parameter
// on closure ReturnNoExpression
struct Foo<T>(T);
fn main() {
|| {
if false {
return Foo(0);
}
Foo(())
//~^ ERROR mismatched types [E0308]
};
}