2019-07-27 00:54:25 +03:00
|
|
|
// run-pass
|
|
|
|
|
2020-05-17 10:22:48 +02:00
|
|
|
#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
|
2016-07-01 18:36:54 +03:00
|
|
|
|
|
|
|
trait Specializable { type Output; }
|
|
|
|
|
|
|
|
impl<T> Specializable for T {
|
|
|
|
default type Output = u16;
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
unsafe {
|
|
|
|
std::mem::transmute::<u16, <() as Specializable>::Output>(0);
|
|
|
|
}
|
|
|
|
}
|