From 430c62a4f32989f1bf27967f70bbbd49f9d790fa Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 6 Aug 2015 18:35:30 +0200 Subject: [PATCH 1/1] correct the comment on the unsafe powers --- src/part16.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/part16.rs b/src/part16.rs index f5735b8..3b0a1d0 100644 --- a/src/part16.rs +++ b/src/part16.rs @@ -59,8 +59,8 @@ pub struct LinkedList { //@ We declare `raw_into_box` to be an `unsafe` function, telling Rust that calling this function is not generally safe. //@ This grants us the unsafe powers for the body of the function: We can dereference raw pointers, and - most importantly - we -//@ can call unsafe functions. (There's a third power, related to mutable static variables, but we didn't talk about static variables -//@ in the course, so that won't be relevant here.)
+//@ can call unsafe functions. (The other unsafe powers won't be relevant here. Go read [The Rustonomicon](https://doc.rust-lang.org/nightly/nomicon/) +//@ if you want to learn all about this, but be warned - That Way Lies Madness.)
//@ Here, the caller will have to ensure that `r` is a valid pointer, and that nobody else has a pointer to this data. unsafe fn raw_into_box(r: *mut T) -> Box { mem::transmute(r) -- 2.30.2