summary refs log tree commit diff
path: root/src/test/ui/transmute-specialization.rs
blob: 002fba9ce810131711b900581d2b2ef68238397c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// 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);
    }
}