blob: 09b6d582d871c2e076603f328628ca33dac7660a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
//@ check-fail
#![feature(transmutability)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
pub fn is_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, { Assume::SAFETY }>
{}
}
fn main() {
assert::is_transmutable::<&'static mut bool, &'static mut u8>() //~ ERROR cannot be safely transmuted
}
|