blob: 2995c3ed2ec726e1d7c605fd8be904be7bbbd22f [file] [log] [blame] [edit]
// Regression test for https://github.com/rust-lang/rust/issues/148161
trait Trait {
type Assoc;
}
impl Trait for u8 {
type Assoc = i8;
}
struct Struct<T: Trait> {
member: T::Assoc,
}
unsafe extern "C" {
// This used to be an ICE due to normalization failure on `<Struct<i8> as Trait>::Assoc`
// while wf checking this static item.
static VAR: Struct<i8>;
//~^ ERROR: the trait bound `i8: Trait` is not satisfied
}
fn main() {}