rust/tests/crashes/124031.rs
2024-04-18 06:13:47 +02:00

18 lines
235 B
Rust

//@ known-bug: #124031
trait Trait {
type RefTarget;
}
impl Trait for () {}
struct Other {
data: <() as Trait>::RefTarget,
}
fn main() {
unsafe {
std::mem::transmute::<Option<()>, Option<&Other>>(None);
}
}