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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
299 B
Rust
Raw Normal View History

// run-pass
2020-05-17 08:22:48 +00: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);
}
}