Skip to content

Commit

Permalink
Rollup merge of rust-lang#125909 - fmease:rustdoc-add-test-synth-blan…
Browse files Browse the repository at this point in the history
…ket-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
  • Loading branch information
matthiaskrgr authored Jun 3, 2024
2 parents 765f55c + b320ac7 commit 0b0dc46
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/rustdoc-ui/ice-blanket-impl-119792.rs
Original file line number Diff line number Diff line change
@@ -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> {}

0 comments on commit 0b0dc46

Please sign in to comment.