]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/nested-return-type3-tait2.rs
Rollup merge of #104024 - noeddl:unused-must-use, r=compiler-errors
[rust.git] / src / test / ui / impl-trait / nested-return-type3-tait2.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 type Traitable = impl Trait<Assoc = Sendable>;
19 //~^ WARN opaque type `Traitable` does not satisfy its associated type bounds
20
21 fn foo() -> Traitable {
22     42
23 }
24
25 fn main() {
26 }