summaryrefslogtreecommitdiffstats
path: root/tests/ui/closures/issue-25439.rs
blob: 0269270b1b045e421839b53b70e5d5210bb3b9ab (plain)
1
2
3
4
5
6
7
8
9
struct Helper<'a, F: 'a>(&'a F);

fn fix<F>(f: F) -> i32 where F: Fn(Helper<F>, i32) -> i32 {
    f(Helper(&f), 8)
}

fn main() {
    fix(|_, x| x); //~ ERROR closure/coroutine type that references itself [E0644]
}