summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-25439.rs
blob: 4f73ff3e38b9ee1d15574596e8c04a7883045fc9 (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/generator type that references itself [E0644]
}