summary refs log tree commit diff
path: root/tests/crashes/126982.rs
blob: 8522d9415eb88bdf772f8ae8a143ad78a0190486 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//@ 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() {}