rust/tests/ui/closures/issue-25439.rs
2023-10-20 21:14:01 +00:00

10 lines
215 B
Rust

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]
}