mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
20 lines
369 B
Rust
20 lines
369 B
Rust
//@ normalize-stderr-test "\d+ bits" -> "N bits"
|
|
|
|
use std::mem;
|
|
use std::marker::PhantomData;
|
|
|
|
trait Foo {
|
|
type Error;
|
|
}
|
|
|
|
struct Bar<U: Foo> {
|
|
stream: PhantomData<U::Error>,
|
|
}
|
|
|
|
fn foo<U: Foo>(x: [usize; 2]) -> Bar<U> {
|
|
unsafe { mem::transmute(x) }
|
|
//~^ ERROR cannot transmute between types of different sizes, or dependently-sized types
|
|
}
|
|
|
|
fn main() {}
|