summaryrefslogtreecommitdiffstats
path: root/src/test/ui/closures/issue-84128.rs
blob: f81d7cfaa654bc9efe1976840968d2a86e8786fe (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 paramenter
// on closure ReturnNoExpression

struct Foo<T>(T);

fn main() {
    || {
        if false {
            return Foo(0);
        }

        Foo(())
        //~^ ERROR mismatched types [E0308]
    };
}