mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
12 lines
251 B
Rust
12 lines
251 B
Rust
trait Trait<'a> {
|
|
type A;
|
|
type B;
|
|
}
|
|
|
|
fn foo<'a, T: Trait<'a>>(value: T::A) {
|
|
let new: T::B = unsafe { std::mem::transmute(value) };
|
|
//~^ ERROR: cannot transmute between types of different sizes, or dependently-sized types
|
|
}
|
|
|
|
fn main() { }
|