about summary refs log tree commit diff
path: root/tests/rustdoc-ui
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rustdoc-ui')
-rw-r--r--tests/rustdoc-ui/ice-assoc-type-loop-102154.rs16
-rw-r--r--tests/rustdoc-ui/ice-method-where-clause-circular-100620.rs22
-rw-r--r--tests/rustdoc-ui/ice-unresolved-import-100241.rs14
3 files changed, 52 insertions, 0 deletions
diff --git a/tests/rustdoc-ui/ice-assoc-type-loop-102154.rs b/tests/rustdoc-ui/ice-assoc-type-loop-102154.rs
new file mode 100644
index 00000000000..68e22ce6ea1
--- /dev/null
+++ b/tests/rustdoc-ui/ice-assoc-type-loop-102154.rs
@@ -0,0 +1,16 @@
+//@ check-pass
+// https://github.com/rust-lang/rust/issues/102154
+
+trait A<Y, N> {
+    type B;
+}
+type MaybeBox<T> = <T as A<T, Box<T>>>::B;
+struct P {
+    t: MaybeBox<P>
+}
+impl<Y, N> A<Y, N> for P {
+    type B = N;
+}
+fn main() {
+    let t: MaybeBox<P>;
+}
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> {}
diff --git a/tests/rustdoc-ui/ice-unresolved-import-100241.rs b/tests/rustdoc-ui/ice-unresolved-import-100241.rs
new file mode 100644
index 00000000000..eef4b8355bf
--- /dev/null
+++ b/tests/rustdoc-ui/ice-unresolved-import-100241.rs
@@ -0,0 +1,14 @@
+//! See [`S`].
+
+// Check that this isn't an ICE
+//@ should-fail
+
+// https://github.com/rust-lang/rust/issues/100241
+
+mod foo {
+    pub use inner::S;
+    //~^ ERROR unresolved imports `inner`, `foo::S`
+}
+
+use foo::*;
+use foo::S;