]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-32377.rs
Merge commit '97e504549371d7640cf011d266e3c17394fdddac' into sync_cg_clif-2021-12-20
[rust.git] / src / test / ui / issues / issue-32377.rs
1 // normalize-stderr-test "\d+ bits" -> "N bits"
2
3 use std::mem;
4 use std::marker::PhantomData;
5
6 trait Foo {
7     type Error;
8 }
9
10 struct Bar<U: Foo> {
11     stream: PhantomData<U::Error>,
12 }
13
14 fn foo<U: Foo>(x: [usize; 2]) -> Bar<U> {
15     unsafe { mem::transmute(x) }
16     //~^ ERROR cannot transmute between types of different sizes, or dependently-sized types
17 }
18
19 fn main() {}