Add regression test

This commit is contained in:
Oli Scherer 2022-02-01 14:43:46 +00:00
parent ee2158f1ee
commit ebf2772c58

View file

@ -0,0 +1,19 @@
#![feature(type_alias_impl_trait)]
// this test used to stack overflow due to infinite recursion.
// check-pass
// compile-flags: --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;
fn blah<'a>(_value: &'a u8) -> BlahFut<'a> {
async {}
}