rust/tests/ui/transmute-equal-assoc-types.rs
2024-02-16 20:02:50 +00:00

12 lines
140 B
Rust

//@ check-pass
trait Foo {
type Bar;
}
unsafe fn noop<F: Foo>(foo: F::Bar) -> F::Bar {
::std::mem::transmute(foo)
}
fn main() {}