Skip to content

Commit 9793abc

Browse files
Add test
1 parent 200f466 commit 9793abc

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// edition:2021
2+
3+
pub trait T {}
4+
impl T for () {}
5+
6+
pub struct S {}
7+
8+
impl S {
9+
pub async fn f<'a>(&self) -> impl T + 'a {
10+
()
11+
}
12+
}

tests/ui/async-await/issue-107036.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// aux-build:issue-107036.rs
2+
// edition:2021
3+
// check-pass
4+
5+
extern crate issue_107036;
6+
use issue_107036::S;
7+
8+
async fn f() {
9+
S{}.f().await;
10+
}
11+
12+
fn main() {
13+
let _ = f();
14+
}

0 commit comments

Comments
 (0)