diff options
Diffstat (limited to 'src/test/ui/associated-type-bounds/supertrait-referencing.rs')
-rw-r--r-- | src/test/ui/associated-type-bounds/supertrait-referencing.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/ui/associated-type-bounds/supertrait-referencing.rs b/src/test/ui/associated-type-bounds/supertrait-referencing.rs new file mode 100644 index 000000000..2e9753515 --- /dev/null +++ b/src/test/ui/associated-type-bounds/supertrait-referencing.rs @@ -0,0 +1,19 @@ +// check-pass + +// The goal of this test is to ensure that T: Bar<T::Item> +// in the where clause does not cycle + +trait Foo { + type Item; +} + +trait Bar<T> {} + +fn baz<T>() +where + T: Foo, + T: Bar<T::Item>, +{ +} + +fn main() {} |