rust/tests/crashes/125841.rs

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

15 lines
221 B
Rust
Raw Normal View History

2024-06-09 00:36:21 +08:00
//@ known-bug: rust-lang/rust#125841
#![feature(non_lifetime_binders)]
fn take(id: impl for<T> Fn(T) -> T) {
id(0);
id("");
}
fn take2() -> impl for<T> Fn(T) -> T {
|x| x
}
fn main() {
take(|x| take2)
}