Guest User

Untitled

a guest
Dec 10th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. #![feature(maybe_uninit)]
  2.  
  3. fn main() {
  4. use std::mem::MaybeUninit;
  5. let mut x = MaybeUninit::<i32>::uninitialized();
  6. fn foo(x: *mut i32) { unsafe { *x = 3; } }
  7. foo(x.as_mut_ptr());
  8. }
Add Comment
Please, Sign In to add comment