rust/tests/ui/structs/ice-struct-tail-normalization-113272.rs
Gurinder Singh 0c71c9d74b Handle normalization failure in struct_tail_erasing_lifetimes
Fixes an ICE that occurred when the struct in question has an error
2024-05-01 09:29:33 +05:30

18 lines
349 B
Rust

trait Trait {
type RefTarget;
}
impl Trait for () where Missing: Trait {}
//~^ ERROR cannot find type `Missing` in this scope
//~| ERROR not all trait items implemented, missing: `RefTarget`
struct Other {
data: <() as Trait>::RefTarget,
}
fn main() {
unsafe {
std::mem::transmute::<Option<()>, Option<&Other>>(None);
}
}