about summary refs log tree commit diff
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2024-06-04 08:25:49 +0100
committerGitHub <noreply@github.com>2024-06-04 08:25:49 +0100
commit6abb7fba12566f799b16108989c2d547d8fb1c5f (patch)
tree0c4a958b9d3eccea37820f79e65390ce1c63549a
parent756af9d5bcb073ba8344d2504614922a4bab22e4 (diff)
parentb320ac749193d87b8705c5baaa75ba7b9433448f (diff)
downloadrust-6abb7fba12566f799b16108989c2d547d8fb1c5f.tar.gz
rust-6abb7fba12566f799b16108989c2d547d8fb1c5f.zip
Rollup merge of #125909 - fmease:rustdoc-add-test-synth-blanket-impls, r=GuillaumeGomez
rustdoc: add a regression test for a former blanket impl synthesis ICE

Fixes #119792 (also passes in #125907 in case you were wondering).

r? rustdoc
-rw-r--r--tests/rustdoc-ui/ice-blanket-impl-119792.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/rustdoc-ui/ice-blanket-impl-119792.rs b/tests/rustdoc-ui/ice-blanket-impl-119792.rs
new file mode 100644
index 00000000000..90f0ea8469b
--- /dev/null
+++ b/tests/rustdoc-ui/ice-blanket-impl-119792.rs
@@ -0,0 +1,19 @@
+//@ check-pass
+// https://github.com/rust-lang/rust/issues/119792
+
+struct Wrapper<T>(T);
+
+trait Div<Rhs> {}
+trait Mul<Rhs> {
+    type Output;
+}
+
+impl<T> Mul<T> for Wrapper<T> {
+    type Output = ();
+}
+
+impl<T> Div<Self> for Wrapper<T> {}
+
+pub trait NumOps<Rhs> {}
+
+impl<T, Rhs> NumOps<Rhs> for T where T: Mul<Rhs, Output = ()> + Div<Rhs> {}