mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 15:54:15 +00:00
10 lines
215 B
Rust
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/generator type that references itself [E0644]
|
|
}
|