// ICE assertion failed: matches!(self.def_kind(ct.def.did), DefKind :: AnonConst) // issue: rust-lang/rust#108220 //@ check-pass #![feature(associated_const_equality)] #![allow(unused)] use std::marker::PhantomData; pub struct NoPin; pub trait SetAlternate {} impl SetAlternate<0> for NoPin {} pub trait PinA { const A: u8; } impl PinA for NoPin { const A: u8 = 0; } pub trait Pins {} impl Pins for T where T: PinA + SetAlternate { } struct Serial(PhantomData); impl Serial where NoPin: Pins {} fn main() {}