rust/tests/ui/specialization/transmute-specialization.rs

16 lines
299 B
Rust
Raw Normal View History

// run-pass
2020-05-17 03:22:48 -05:00
#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
trait Specializable { type Output; }
impl<T> Specializable for T {
default type Output = u16;
}
fn main() {
unsafe {
std::mem::transmute::<u16, <() as Specializable>::Output>(0);
}
}