about summary refs log tree commit diff
path: root/src/test/rustdoc/inline_cross
diff options
context:
space:
mode:
authorLeón Orell Valerian Liehr <liehr.exchange@gmx.net>2022-10-18 15:34:41 +0200
committerLeón Orell Valerian Liehr <liehr.exchange@gmx.net>2022-10-19 17:59:05 +0200
commit2cc4a0aad72752a4d485ced76bab677620f088b8 (patch)
tree0eb9d893fb6a556ce825d14d1d74336bce477304 /src/test/rustdoc/inline_cross
parentd7dd01fe8b071602510eaac9f676acc0e3cf8e4a (diff)
downloadrust-2cc4a0aad72752a4d485ced76bab677620f088b8.tar.gz
rust-2cc4a0aad72752a4d485ced76bab677620f088b8.zip
rustdoc: render bounds of cross-crate GAT params
Diffstat (limited to 'src/test/rustdoc/inline_cross')
-rw-r--r--src/test/rustdoc/inline_cross/assoc_item_trait_bounds.out0.html1
-rw-r--r--src/test/rustdoc/inline_cross/assoc_item_trait_bounds.out2.html1
-rw-r--r--src/test/rustdoc/inline_cross/assoc_item_trait_bounds.out9.html (renamed from src/test/rustdoc/inline_cross/assoc_item_trait_bounds_with_bindings.out9.html)0
-rw-r--r--src/test/rustdoc/inline_cross/assoc_item_trait_bounds.rs (renamed from src/test/rustdoc/inline_cross/assoc_item_trait_bounds_with_bindings.rs)15
-rw-r--r--src/test/rustdoc/inline_cross/assoc_item_trait_bounds_with_bindings.out0.html1
-rw-r--r--src/test/rustdoc/inline_cross/auxiliary/assoc_item_trait_bounds.rs (renamed from src/test/rustdoc/inline_cross/auxiliary/assoc_item_trait_bounds_with_bindings.rs)1
6 files changed, 11 insertions, 8 deletions
diff --git a/src/test/rustdoc/inline_cross/assoc_item_trait_bounds.out0.html b/src/test/rustdoc/inline_cross/assoc_item_trait_bounds.out0.html
new file mode 100644
index 00000000000..8934bc1ee33
--- /dev/null
+++ b/src/test/rustdoc/inline_cross/assoc_item_trait_bounds.out0.html
@@ -0,0 +1 @@
+<h4 class="code-header">type <a href="#associatedtype.Out0" class="associatedtype">Out0</a>: <a class="trait" href="../assoc_item_trait_bounds/trait.Support.html" title="trait assoc_item_trait_bounds::Support">Support</a>&lt;Item = <a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>&gt;</h4>
\ No newline at end of file
diff --git a/src/test/rustdoc/inline_cross/assoc_item_trait_bounds.out2.html b/src/test/rustdoc/inline_cross/assoc_item_trait_bounds.out2.html
new file mode 100644
index 00000000000..bf330670ed0
--- /dev/null
+++ b/src/test/rustdoc/inline_cross/assoc_item_trait_bounds.out2.html
@@ -0,0 +1 @@
+<h4 class="code-header">type <a href="#associatedtype.Out2" class="associatedtype">Out2</a>&lt;T&gt;: <a class="trait" href="../assoc_item_trait_bounds/trait.Support.html" title="trait assoc_item_trait_bounds::Support">Support</a>&lt;Item = T&gt;</h4>
\ No newline at end of file
diff --git a/src/test/rustdoc/inline_cross/assoc_item_trait_bounds_with_bindings.out9.html b/src/test/rustdoc/inline_cross/assoc_item_trait_bounds.out9.html
index 69d84e1b2c1..69d84e1b2c1 100644
--- a/src/test/rustdoc/inline_cross/assoc_item_trait_bounds_with_bindings.out9.html
+++ b/src/test/rustdoc/inline_cross/assoc_item_trait_bounds.out9.html
diff --git a/src/test/rustdoc/inline_cross/assoc_item_trait_bounds_with_bindings.rs b/src/test/rustdoc/inline_cross/assoc_item_trait_bounds.rs
index 00976aa7442..5f4712aab5b 100644
--- a/src/test/rustdoc/inline_cross/assoc_item_trait_bounds_with_bindings.rs
+++ b/src/test/rustdoc/inline_cross/assoc_item_trait_bounds.rs
@@ -1,13 +1,10 @@
 // Regression test for issues #77763, #84579 and #102142.
 #![crate_name = "main"]
 
-// aux-build:assoc_item_trait_bounds_with_bindings.rs
+// aux-build:assoc_item_trait_bounds.rs
 // build-aux-docs
 // ignore-cross-compile
-extern crate assoc_item_trait_bounds_with_bindings as aux;
-
-// FIXME(fmease): Don't render an incorrect `T: ?Sized` where-clause for parameters
-//                of GATs like `Main::Out{2,4}`. Add a snapshot test once it's fixed.
+extern crate assoc_item_trait_bounds as aux;
 
 // @has main/trait.Main.html
 // @has - '//*[@id="associatedtype.Out0"]' 'type Out0: Support<Item = ()>'
@@ -24,11 +21,15 @@ extern crate assoc_item_trait_bounds_with_bindings as aux;
 // @has - '//*[@id="associatedtype.Out11"]' "type Out11: for<'r, 's> Helper<A<'s> = &'s (), B<'r> = ()>"
 // @has - '//*[@id="associatedtype.Out12"]' "type Out12: for<'w> Helper<B<'w> = Cow<'w, str>, A<'w> = bool>"
 // @has - '//*[@id="associatedtype.Out13"]' "type Out13: for<'fst, 'snd> Aid<'snd, Result<'fst> = &'fst mut str>"
+// @has - '//*[@id="associatedtype.Out14"]' "type Out14<P: Copy + Eq, Q: ?Sized>"
 //
-// Snapshots: Check that we do not render any where-clauses for those associated types since all of
-// the trait bounds contained within were moved to the bounds of the respective item.
+// Snapshots:
+// Check that we don't render any where-clauses for the following associated types since
+// all corresponding projection equality predicates should have already been re-sugared
+// to associated type bindings:
 //
 // @snapshot out0 - '//*[@id="associatedtype.Out0"]/*[@class="code-header"]'
+// @snapshot out2 - '//*[@id="associatedtype.Out2"]/*[@class="code-header"]'
 // @snapshot out9 - '//*[@id="associatedtype.Out9"]/*[@class="code-header"]'
 //
 // @has - '//*[@id="tymethod.make"]' \
diff --git a/src/test/rustdoc/inline_cross/assoc_item_trait_bounds_with_bindings.out0.html b/src/test/rustdoc/inline_cross/assoc_item_trait_bounds_with_bindings.out0.html
deleted file mode 100644
index 927a1a42a1f..00000000000
--- a/src/test/rustdoc/inline_cross/assoc_item_trait_bounds_with_bindings.out0.html
+++ /dev/null
@@ -1 +0,0 @@
-<h4 class="code-header">type <a href="#associatedtype.Out0" class="associatedtype">Out0</a>: <a class="trait" href="../assoc_item_trait_bounds_with_bindings/trait.Support.html" title="trait assoc_item_trait_bounds_with_bindings::Support">Support</a>&lt;Item = <a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>&gt;</h4>
\ No newline at end of file
diff --git a/src/test/rustdoc/inline_cross/auxiliary/assoc_item_trait_bounds_with_bindings.rs b/src/test/rustdoc/inline_cross/auxiliary/assoc_item_trait_bounds.rs
index f451b1a0e99..d326e61daea 100644
--- a/src/test/rustdoc/inline_cross/auxiliary/assoc_item_trait_bounds_with_bindings.rs
+++ b/src/test/rustdoc/inline_cross/auxiliary/assoc_item_trait_bounds.rs
@@ -15,6 +15,7 @@ pub trait Main {
     type Out11: for<'r, 's> Helper<A<'s> = &'s (), B<'r> = ()>;
     type Out12: for<'w> Helper<B<'w> = std::borrow::Cow<'w, str>, A<'w> = bool>;
     type Out13: for<'fst, 'snd> Aid<'snd, Result<'fst> = &'fst mut str>;
+    type Out14<P: Copy + Eq, Q: ?Sized>;
 
     fn make<F>(_: F, _: impl FnMut(&str) -> bool)
     where