fn deference_raw_pointers() {
    let mut num = 5;

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

    unsafe {
        println!("r1: {}", *r1);
        println!("r2: {}", *r2);
    }
}
// Creating a pointer does no harm; it's only when we try to access the value
// that it points at that we might end up dealing with an invalid value.
Creating a pointer does no harm; it's only when we try to access the value
that it points at that we might end up dealing with an invalid value.
Creating a pointer does no harm ; it ' s only when we try to access the value that it points at that we might end up dealing with an invalid value .
fn deference_raw_pointers() {
    let mut num = 5;
    let r1: *const i32 = &num as *const i32;
    let r2: *mut i32 = &mut num as *mut i32;
    unsafe {
        println!("r1: {}", *r1);
        println!("r2: {}", *r2);
    }
}
fn deference_raw_pointers ( ) { let mut num = 5 ; let r1 : * const i32 = & num as * const i32 ; let r2 : * mut i32 = & mut num as * mut i32 ; unsafe { println ! ( " " r1 ) ; println ! ( " " r2 ) ; } }
Creating a pointer does no harm; it's only when we try to access the value
that it points at that we might end up dealing with an invalid value.
Creating a pointer does no harm ; it ' s only when we try to access the value that it points at that we might end up dealing with an invalid value .