rust/src/test/ui/transmute-specialization.rs
2019-07-27 18:56:16 +03:00

16 lines
247 B
Rust

// run-pass
#![feature(specialization)]
trait Specializable { type Output; }
impl<T> Specializable for T {
default type Output = u16;
}
fn main() {
unsafe {
std::mem::transmute::<u16, <() as Specializable>::Output>(0);
}
}