blob: 22cb379ffdab0f73d5956295b5c8b84f6ea3c6f7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
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() { }
// https://github.com/rust-lang/rust/issues/21174
|