about summary refs log tree commit diff
path: root/tests/ui/type-alias-impl-trait/issue-93411.rs
blob: 614d2d0471b97e28b08f09d3a13c83a24092ff96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#![feature(type_alias_impl_trait)]

// this test used to stack overflow due to infinite recursion.
//@ check-pass
//@ edition: 2018

use std::future::Future;

fn main() {
    let _ = move || async move {
        let value = 0u8;
        blah(&value).await;
    };
}

type BlahFut<'a> = impl Future<Output = ()> + Send + 'a;
#[define_opaque(BlahFut)]
fn blah<'a>(_value: &'a u8) -> BlahFut<'a> {
    async {}
}