rust/tests/ui/issues/issue-25439.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
215 B
Rust
Raw Normal View History

2015-10-01 10:25:45 -05:00
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() {
2017-11-18 12:09:19 -06:00
fix(|_, x| x); //~ ERROR closure/generator type that references itself [E0644]
2015-10-01 10:25:45 -05:00
}