blob: 98deb6457cb07617a2f5ea9321e4e16accd9af48 [file] [log] [blame] [edit]
//@ check-pass
#![feature(transmutability)]
mod assert {
use std::mem::{Assume, TransmuteFrom};
pub fn is_maybe_transmutable<Src, Dst>()
where
Dst: TransmuteFrom<Src, {
Assume {
alignment: false,
lifetimes: true,
safety: true,
validity: false,
}
}>
{}
}
fn main() {
#[repr(C)] struct Unit;
assert::is_maybe_transmutable::<&'static u8, &'static Unit>();
}