mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
18 lines
283 B
Rust
18 lines
283 B
Rust
//edition:2018
|
|
|
|
#![feature(type_alias_impl_trait)]
|
|
|
|
pub trait Foo {
|
|
type X: std::future::Future<Output = ()>;
|
|
fn x(&self) -> Self::X;
|
|
}
|
|
|
|
pub struct F;
|
|
|
|
impl Foo for F {
|
|
type X = impl std::future::Future<Output = ()>;
|
|
fn x(&self) -> Self::X {
|
|
async {}
|
|
}
|
|
}
|