Rollup merge of #26146 - steveklabnik:remove_unsafe_pointer, r=Gankro

Using two terms for one thing is confusing, these are called 'raw pointers' today.
This commit is contained in:
Manish Goregaokar 2015-06-10 22:07:10 +05:30
commit 7d9427e6cd
22 changed files with 33 additions and 33 deletions

View file

@ -238,7 +238,7 @@ However it is often desired that the callback is targeted to a special
Rust object. This could be the object that represents the wrapper for the
respective C object.
This can be achieved by passing an unsafe pointer to the object down to the
This can be achieved by passing an raw pointer to the object down to the
C library. The C library can then include the pointer to the Rust object in
the notification. This will allow the callback to unsafely access the
referenced Rust object.
@ -370,7 +370,7 @@ On OSX, frameworks behave with the same semantics as a dynamic library.
# Unsafe blocks
Some operations, like dereferencing unsafe pointers or calling functions that have been marked
Some operations, like dereferencing raw pointers or calling functions that have been marked
unsafe are only allowed inside unsafe blocks. Unsafe blocks isolate unsafety and are a promise to
the compiler that the unsafety does not leak out of the block.

View file

@ -52,9 +52,9 @@ println!("raw points at {}", *raw);
It gives this error:
```text
error: dereference of unsafe pointer requires unsafe function or block [E0133]
println!("raw points at{}", *raw);
^~~~
error: dereference of raw pointer requires unsafe function or block [E0133]
println!("raw points at {}", *raw);
^~~~
```
When you dereference a raw pointer, youre taking responsibility that its not