Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #[derive(Debug)]
- #[repr(transparent)]
- struct N<'a>(&'a [u8]);
- fn main() {
- let mut a: N = unsafe { std::mem::uninitialized() };
- const b: &[u8] = b"a";
- a = N(&b[..]);
- println!("{:?}", a);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement