Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
468 B
Rust
Raw Normal View History

2023-04-27 18:33:52 -07:00
//@ check-pass
#![feature(transmutability)]
mod assert {
use std::mem::{Assume, TransmuteFrom};
2023-04-27 18:33:52 -07:00
pub fn is_maybe_transmutable<Src, Dst>()
where
Dst: TransmuteFrom<Src, {
2023-04-27 18:33:52 -07:00
Assume {
alignment: false,
lifetimes: false,
safety: true,
validity: false,
}
}>
{}
}
fn main() {
assert::is_maybe_transmutable::<&'static [u16; 0], &'static [u8; 0]>();
}