Guest User

Untitled

a guest
Nov 16th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.13 KB | None | 0 0
  1. #![allow(unused)]
  2. fn main() {
  3. let mut x = 12;
  4. let y = &x as *const i32;
  5.  
  6. x = 13;
  7.  
  8. unsafe {
  9. assert_eq!(std::ptr::read(y), 12);
  10. }
  11. }
Add Comment
Please, Sign In to add comment