Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Jan 19, 2023
1 parent 200f466 commit 9793abc
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/ui/async-await/auxiliary/issue-107036.rs
Original file line number Diff line number Diff line change
@@ -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 changes: 14 additions & 0 deletions tests/ui/async-await/issue-107036.rs
Original file line number Diff line number Diff line change
@@ -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();
}

0 comments on commit 9793abc

Please sign in to comment.