rust/tests/ui/structs/ice-struct-tail-normalization-113272.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
349 B
Rust
Raw Normal View History

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);
}
}