1 #![feature(type_alias_impl_trait)]
13 // the fact that `R` is the `::Output` projection on `F` causes
14 // an intermediate inference var to be generated which is then later
15 // compared against the actually found `Assoc` type.
16 impl<R: Duh, F: FnMut() -> R> Trait for F {
20 type Sendable = impl Send;
22 // The `Sendable` here is converted to an inference var and then later compared
23 // against the inference var created, causing the inference var to be set to
24 // the hidden type of `Sendable` instead of
25 // the hidden type. We already have obligations registered on the inference
26 // var to make it uphold the `: Duh` bound on `Trait::Assoc`. The opaque
27 // type does not implement `Duh`, but if its hidden type does.
28 fn foo() -> impl Trait<Assoc = Sendable> {
29 //~^ WARN opaque type `impl Trait<Assoc = Sendable>` does not satisfy its associated type bounds