about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeón Orell Valerian Liehr <me@fmease.dev>2024-06-03 03:50:15 +0200
committerLeón Orell Valerian Liehr <me@fmease.dev>2024-06-03 03:50:15 +0200
commitb320ac749193d87b8705c5baaa75ba7b9433448f (patch)
treeee5b14d4e5e776a11fa7a95cccded5e4864bbbd6
parent77d41156551dc52a4d5df228c897acd239eb6254 (diff)
downloadrust-b320ac749193d87b8705c5baaa75ba7b9433448f.tar.gz
rust-b320ac749193d87b8705c5baaa75ba7b9433448f.zip
Add a regression test for a former blanket impl synthesis ICE
-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> {}