Sign in
rust
/
rust
/
refs/heads/beta
/
.
/
tests
/
ui
/
specialization
/
transmute-specialization.rs
blob: da0f12cf7169257704c12537f1ebc9aa60d5a146 [
file
] [
edit
]
//@ 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
);
}
}