Skip to content

Commit 0b0dc46

Browse files
authored
Rollup merge of rust-lang#125909 - fmease:rustdoc-add-test-synth-blanket-impls, r=GuillaumeGomez
rustdoc: add a regression test for a former blanket impl synthesis ICE Fixes rust-lang#119792 (also passes in rust-lang#125907 in case you were wondering). r? rustdoc
2 parents 765f55c + b320ac7 commit 0b0dc46

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//@ check-pass
2+
// https://github.com/rust-lang/rust/issues/119792
3+
4+
struct Wrapper<T>(T);
5+
6+
trait Div<Rhs> {}
7+
trait Mul<Rhs> {
8+
type Output;
9+
}
10+
11+
impl<T> Mul<T> for Wrapper<T> {
12+
type Output = ();
13+
}
14+
15+
impl<T> Div<Self> for Wrapper<T> {}
16+
17+
pub trait NumOps<Rhs> {}
18+
19+
impl<T, Rhs> NumOps<Rhs> for T where T: Mul<Rhs, Output = ()> + Div<Rhs> {}

0 commit comments

Comments
 (0)