2023-03-13 21:35:15 +00:00
|
|
|
trait Trait<T> {}
|
|
|
|
|
|
|
|
|
|
struct Bar(Box<dyn Trait<T>>);
|
|
|
|
|
//~^ ERROR cannot find type `T` in this scope
|
|
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
let x: Bar = unsafe { std::mem::transmute(()) };
|
2025-08-14 22:54:50 +00:00
|
|
|
//~^ ERROR cannot transmute between types of different size
|
2023-03-13 21:35:15 +00:00
|
|
|
}
|