]> git.proxmox.com Git - rustc.git/blob - src/test/ui/type-alias-impl-trait/issue-89686.rs
New upstream version 1.61.0+dfsg1
[rustc.git] / src / test / ui / type-alias-impl-trait / issue-89686.rs
1 // edition:2018
2
3 #![feature(type_alias_impl_trait)]
4
5 use std::future::Future;
6
7 type G<'a, T> = impl Future<Output = ()>;
8 //~^ ERROR: the trait bound `T: Trait` is not satisfied
9
10 trait Trait {
11 type F: Future<Output = ()>;
12
13 fn f(&self) -> Self::F;
14
15 fn g<'a>(&'a self) -> G<'a, Self>
16 where
17 Self: Sized,
18 {
19 async move { self.f().await }
20 }
21 }
22
23 fn main() {}