@Araq: That's not the way I'd usually write a Rust `unsafe` block. The block does nothing to ensure that the dereferences are safe. If we assume in this case the only danger is that the pointers might be nil, then: unsafe { if r1 != nil { println!("r1 is: {}", *r1); } if r2 != nil { println!("r2 is: {}", *r2); } } Run
(or maybe it would return an error ... the point is that the `unsafe` block delimits code that is actually safe.)