about summary refs log tree commit diff
path: root/tests/rustdoc-ui/ice-method-where-clause-circular-100620.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rustdoc-ui/ice-method-where-clause-circular-100620.rs')
-rw-r--r--tests/rustdoc-ui/ice-method-where-clause-circular-100620.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/rustdoc-ui/ice-method-where-clause-circular-100620.rs b/tests/rustdoc-ui/ice-method-where-clause-circular-100620.rs
new file mode 100644
index 00000000000..e12b214410b
--- /dev/null
+++ b/tests/rustdoc-ui/ice-method-where-clause-circular-100620.rs
@@ -0,0 +1,22 @@
+//@ check-pass
+// https://github.com/rust-lang/rust/issues/100620
+
+pub trait Bar<S> {}
+
+pub trait Qux<T> {}
+
+pub trait Foo<T, S> {
+    fn bar()
+    where
+        T: Bar<S>,
+    {
+    }
+}
+
+pub struct Concrete;
+
+impl<S> Foo<(), S> for Concrete {}
+
+impl<T, S> Bar<S> for T where S: Qux<T> {}
+
+impl<T, S> Qux<T> for S where T: Bar<S> {}