diff options
Diffstat (limited to 'tests/ui/impl-trait/nested-return-type3.rs')
-rw-r--r-- | tests/ui/impl-trait/nested-return-type3.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/ui/impl-trait/nested-return-type3.rs b/tests/ui/impl-trait/nested-return-type3.rs new file mode 100644 index 000000000..5a764fc4c --- /dev/null +++ b/tests/ui/impl-trait/nested-return-type3.rs @@ -0,0 +1,21 @@ +// check-pass + +trait Duh {} + +impl Duh for i32 {} + +trait Trait { + type Assoc: Duh; +} + +impl<F: Duh> Trait for F { + type Assoc = F; +} + +fn foo() -> impl Trait<Assoc = impl Send> { + //~^ WARN opaque type `impl Trait<Assoc = impl Send>` does not satisfy its associated type bounds + 42 +} + +fn main() { +} |