]> git.lizzy.rs Git - rust.git/blob - tests/ui/impl-trait/nested-return-type3-tait.rs
Rollup merge of #106427 - mejrs:translation_errors, r=davidtwco
[rust.git] / tests / ui / impl-trait / nested-return-type3-tait.rs
1 // check-pass
2
3 #![feature(type_alias_impl_trait)]
4
5 trait Duh {}
6
7 impl Duh for i32 {}
8
9 trait Trait {
10     type Assoc: Duh;
11 }
12
13 impl<F: Duh> Trait for F {
14     type Assoc = F;
15 }
16
17 type Sendable = impl Send;
18
19 fn foo() -> impl Trait<Assoc = Sendable> {
20     //~^ WARN opaque type `impl Trait<Assoc = Sendable>` does not satisfy its associated type bounds
21     42
22 }
23
24 fn main() {
25 }