]> git.lizzy.rs Git - rust.git/blob - tests/ui/type-alias-impl-trait/issue-89686.rs
Rollup merge of #106717 - klensy:typo, r=lcnr
[rust.git] / tests / 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 = ()> + 'a;
8
9 trait Trait {
10     type F: Future<Output = ()>;
11
12     fn f(&self) -> Self::F;
13
14     fn g<'a>(&'a self) -> G<'a, Self>
15     where
16         Self: Sized,
17     {
18         async move { self.f().await }
19         //~^ ERROR: the trait bound `T: Trait` is not satisfied
20     }
21 }
22
23 fn main() {}