correct the comment on the unsafe powers
authorRalf Jung <post@ralfj.de>
Thu, 6 Aug 2015 16:35:30 +0000 (18:35 +0200)
committerRalf Jung <post@ralfj.de>
Thu, 6 Aug 2015 16:35:30 +0000 (18:35 +0200)
src/part16.rs

index f5735b874e854eebcb4606721bc1c4c55cbce220..3b0a1d05d372aa2f4639f9a88eb4bfa8f5eafd69 100644 (file)
@@ -59,8 +59,8 @@ pub struct LinkedList<T> {
 
 //@ 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
 
 //@ 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.) <br/>
+//@ 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.) <br/>
 //@ 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<T>(r: *mut T) -> Box<T> {
     mem::transmute(r)
 //@ 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<T>(r: *mut T) -> Box<T> {
     mem::transmute(r)