Add test
This commit is contained in:
parent
200f466d1a
commit
9793abc209
12
tests/ui/async-await/auxiliary/issue-107036.rs
Normal file
12
tests/ui/async-await/auxiliary/issue-107036.rs
Normal file
@ -0,0 +1,12 @@
|
||||
// edition:2021
|
||||
|
||||
pub trait T {}
|
||||
impl T for () {}
|
||||
|
||||
pub struct S {}
|
||||
|
||||
impl S {
|
||||
pub async fn f<'a>(&self) -> impl T + 'a {
|
||||
()
|
||||
}
|
||||
}
|
14
tests/ui/async-await/issue-107036.rs
Normal file
14
tests/ui/async-await/issue-107036.rs
Normal file
@ -0,0 +1,14 @@
|
||||
// aux-build:issue-107036.rs
|
||||
// edition:2021
|
||||
// check-pass
|
||||
|
||||
extern crate issue_107036;
|
||||
use issue_107036::S;
|
||||
|
||||
async fn f() {
|
||||
S{}.f().await;
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let _ = f();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user