summaryrefslogtreecommitdiffstats
path: root/tests/ui/closures/issue-84128.rs
blob: 30733871b855f0fadf41a883c777fa476f208a30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// 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]
    };
}