SHARE
TWEET

Untitled

a guest Mar 22nd, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #[derive(Debug)]
  2. #[repr(transparent)]
  3. struct N<'a>(&'a [u8]);
  4.  
  5. fn main() {
  6.     let mut a: N = unsafe { std::mem::uninitialized() };
  7.     const b: &[u8] = b"a";
  8.     a = N(&b[..]);
  9.     println!("{:?}", a);
  10. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top