forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1898c34
commit b1cc95d
Showing
2 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// check-pass | ||
// edition:2021 | ||
|
||
#![feature(async_fn_in_trait, return_position_impl_trait_in_trait)] | ||
#![allow(incomplete_features)] | ||
|
||
pub trait Foo { | ||
async fn bar<'a: 'a>(&'a mut self); | ||
} | ||
|
||
impl Foo for () { | ||
async fn bar<'a: 'a>(&'a mut self) {} | ||
} | ||
|
||
pub trait Foo2 { | ||
fn bar<'a: 'a>(&'a mut self) -> impl Sized + 'a; | ||
} | ||
|
||
impl Foo2 for () { | ||
fn bar<'a: 'a>(&'a mut self) -> impl Sized + 'a {} | ||
} | ||
|
||
fn main() {} |