rust/tests/ui/closures/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 15:25:45 +00: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() {
2023-10-19 21:46:28 +00:00
fix(|_, x| x); //~ ERROR closure/coroutine type that references itself [E0644]
2015-10-01 15:25:45 +00:00
}