]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/impl-trait/nested-return-type2.rs
11 // the fact that `R` is the `::Output` projection on `F` causes
12 // an intermediate inference var to be generated which is then later
13 // compared against the actually found `Assoc` type.
14 impl<R
: Duh
, F
: FnMut() -> R
> Trait
for F
{
18 // The `impl Send` here is then later compared against the inference var
19 // created, causing the inference var to be set to `impl Send` instead of
20 // the hidden type. We already have obligations registered on the inference
21 // var to make it uphold the `: Duh` bound on `Trait::Assoc`. The opaque
22 // type does not implement `Duh`, even if its hidden type does.
23 // Lazy TAIT would error out, but we inserted a hack to make it work again,
24 // keeping backwards compatibility.
25 fn foo() -> impl Trait
<Assoc
= impl Send
> {
26 //~^ WARN opaque type `impl Trait<Assoc = impl Send>` does not satisfy its associated type bounds