about summary refs log tree commit diff
path: root/tests/rustdoc-ui
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-04-28 07:34:03 +0200
committerGitHub <noreply@github.com>2023-04-28 07:34:03 +0200
commit8ce92daa854e329f4fb7ac75c28dbeea3f5bb125 (patch)
tree8f273abee467c126bb35aae94015472c2580e8f3 /tests/rustdoc-ui
parent29f5ec364060c5744430322bb88a65b017eda79c (diff)
parent34d96886d48a9d7deb53ae1f6a13b571b5caeb78 (diff)
Rollup merge of #110904 - fmease:rustdoc-fix-110900, r=compiler-errors
rustdoc: rebind bound vars to type-outlives predicates

Fixes #110900.
Diffstat (limited to 'tests/rustdoc-ui')
-rw-r--r--tests/rustdoc-ui/issue-110900.rs28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/rustdoc-ui/issue-110900.rs b/tests/rustdoc-ui/issue-110900.rs
new file mode 100644
index 00000000000..e3154baf860
--- /dev/null
+++ b/tests/rustdoc-ui/issue-110900.rs
@@ -0,0 +1,28 @@
+// check-pass
+
+#![crate_type="lib"]
+#![feature(associated_type_bounds)]
+
+trait A<'a> {}
+trait B<'b> {}
+
+trait C<'c>: for<'a> A<'a> + for<'b> B<'b> {
+    type As;
+}
+
+trait E<'e> {
+    type As;
+}
+trait F<'f>: for<'a> A<'a> + for<'e> E<'e> {}
+struct G<T>
+where
+    T: for<'l, 'i> H<'l, 'i, As: for<'a> A<'a> + 'i>
+{
+    t: std::marker::PhantomData<T>,
+}
+
+trait I<'a, 'b, 'c> {
+    type As;
+}
+
+trait H<'d, 'e>: for<'f> I<'d, 'f, 'e> + 'd {}