diff options
Diffstat (limited to 'tests/ui/associated-type-bounds/issue-83017.rs')
-rw-r--r-- | tests/ui/associated-type-bounds/issue-83017.rs | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/ui/associated-type-bounds/issue-83017.rs b/tests/ui/associated-type-bounds/issue-83017.rs new file mode 100644 index 000000000..a02208661 --- /dev/null +++ b/tests/ui/associated-type-bounds/issue-83017.rs @@ -0,0 +1,39 @@ +// check-pass + +#![feature(associated_type_bounds)] + +trait TraitA<'a> { + type AsA; +} + +trait TraitB<'a, 'b> { + type AsB; +} + +trait TraitC<'a, 'b, 'c> {} + +struct X; + +impl<'a, 'b, 'c> TraitC<'a, 'b, 'c> for X {} + +struct Y; + +impl<'a, 'b> TraitB<'a, 'b> for Y { + type AsB = X; +} + +struct Z; + +impl<'a> TraitA<'a> for Z { + type AsA = Y; +} + +fn foo<T>() +where + for<'a> T: TraitA<'a, AsA: for<'b> TraitB<'a, 'b, AsB: for<'c> TraitC<'a, 'b, 'c>>>, +{ +} + +fn main() { + foo::<Z>(); +} |