mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
19 lines
245 B
Rust
19 lines
245 B
Rust
|
//@ 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() {}
|