mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
16 lines
299 B
Rust
16 lines
299 B
Rust
// run-pass
|
|
|
|
#![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);
|
|
}
|
|
}
|