rust/tests/crashes/117392-2.rs

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

28 lines
476 B
Rust
Raw Normal View History

//@ known-bug: #117392
pub trait BorrowComposite {
type Ref<'a>: 'a;
}
impl BorrowComposite for () {
type Ref<'a> = ();
}
pub trait Component<Args> {
type Output;
}
impl<Args> Component<Args> for () {
type Output = ();
}
pub fn delay<Args: BorrowComposite, Make: for<'a> FnMut(Args::Ref<'a>) -> C, C: Component<Args>>(
make: Make,
) -> impl Component<Args> {
}
pub fn crash() -> impl Component<()> {
delay(|()| delay(|()| ()))
}
pub fn main() {}