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
jieyouxu authored Jun 3, 2024
2 parents e824e40 + b320ac7 commit 0d5f055
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 0d5f055

Please sign in to comment.