rust/tests/crashes/122904-2.rs

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

18 lines
270 B
Rust
Raw Normal View History

//@ known-bug: #122904
trait T {}
type Alias<'a> = impl T;
struct S;
impl<'a> T for &'a S {}
#[define_opaque(Alias)]
fn with_positive(fun: impl Fn(Alias<'_>)) {
with_positive(|&n| ());
}
#[define_opaque(Alias)]
fn main(Alias<'_>) {
with_positive(|&a| ());
}