Skip to content

Commit

Permalink
Add a regression test for a former blanket impl synthesis ICE
Browse files Browse the repository at this point in the history
  • Loading branch information
fmease committed Jun 3, 2024
1 parent 77d4115 commit b320ac7
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 b320ac7

Please sign in to comment.