Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Casting from a pointer should have type 'usize', not 'i32'. #866

Merged
merged 2 commits into from
Aug 5, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions second-edition/src/ch19-01-unsafe-rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ There’s not usually a good reason to be writing code like this, but it is
possible:

```rust
let address = 0x012345;
let address = 0x012345usize;
let r = address as *const i32;
```

Expand Down Expand Up @@ -305,7 +305,7 @@ location and creates a slice ten thousand items long:
```rust
use std::slice;

let address = 0x012345;
let address = 0x012345usize;
let r = address as *mut i32;

let slice = unsafe {
Expand Down