rust/tests/crashes/126982.rs

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

19 lines
245 B
Rust
Raw Normal View History

2024-07-04 21:44:10 +00:00
//@ known-bug: rust-lang/rust#126982
#![feature(coerce_unsized)]
use std::ops::CoerceUnsized;
struct Foo<T: ?Sized> {
a: T,
}
impl<T, U> CoerceUnsized<U> for Foo<T> {}
union U {
a: usize,
}
const C: U = Foo { a: 10 };
fn main() {}