Skip to content

Latest commit

 

History

History
17 lines (11 loc) · 388 Bytes

raw-pointers.md

File metadata and controls

17 lines (11 loc) · 388 Bytes

% Raw Pointers

There is a new edition of the book and this is an old link.

Raw pointers are allowed to ignore many of the rules that references have to follow.

let mut num = 5;

let r1 = &num as *const i32;
let r2 = &mut num as *mut i32;

You can find the latest version of this information here