2 #![feature(transmutability)]
4 #![allow(incomplete_features)]
7 use std::mem::BikeshedIntrinsicFrom;
10 pub fn is_transmutable<Src, Dst>()
12 Dst: BikeshedIntrinsicFrom<Src, Context, false, false, false, true>
15 pub fn is_maybe_transmutable<Src, Dst>()
17 Dst: BikeshedIntrinsicFrom<Src, Context, false, false, true, true>
21 fn contrast_with_u8() {
22 assert::is_transmutable::<u8, bool>(); //~ ERROR cannot be safely transmuted
23 assert::is_maybe_transmutable::<u8, bool>();
24 assert::is_transmutable::<bool, u8>();