rust/tests/ui/structs/ice-struct-tail-normalization-113272.rs
2025-01-14 01:22:04 +01:00

19 lines
385 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);
//~^ ERROR cannot transmute
}
}