]> git.lizzy.rs Git - rust.git/blob - tests/ui/closures/issue-84128.rs
Rollup merge of #106805 - madsravn:master, r=compiler-errors
[rust.git] / tests / ui / closures / issue-84128.rs
1 // test for issue 84128
2 // missing suggestion for similar ADT type with diffetent generic parameter
3 // on closure ReturnNoExpression
4
5 struct Foo<T>(T);
6
7 fn main() {
8     || {
9         if false {
10             return Foo(0);
11         }
12
13         Foo(())
14         //~^ ERROR mismatched types [E0308]
15     };
16 }