Skip to content

Commit

Permalink
Merge pull request #4105 from jpmelos/jpmelos-ch20-01-fix-typos
Browse files Browse the repository at this point in the history
Ch20-01: Fix typos
  • Loading branch information
chriskrycho authored Nov 26, 2024
2 parents ff6c42e + c7e7f8f commit 6cee3d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ch20-01-unsafe-rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ raw pointers in safe code; we just can’t dereference raw pointers outside an
unsafe block, as you’ll see in a bit.

We’ve created raw pointers by using the raw borrow operators: `&raw const num`
creates a `*const i32` immutable raw pointer, and `&raw mut num` creates a `&mut
creates a `*const i32` immutable raw pointer, and `&raw mut num` creates a `*mut
i32` mutable raw pointer. Because we created them directly from a local
variable, we know these particular raw pointers are valid, but we can’t make
that assumption about just any raw pointer.
Expand Down Expand Up @@ -485,7 +485,7 @@ actually is safe and correct. One of the best ways to do that is to use
[Miri][miri], an official Rust tool for detecting undefined behavior. Whereas
the borrow checker is a *static* tool which works at compile time, Miri is a
*dynamic* tool which works at runtime. It checks your code by running your
program, or its test suite, and detecting when you violate the rules its
program, or its test suite, and detecting when you violate the rules it
understands about how Rust should work.
Using Miri requires a nightly build of Rust (which we talk about more in
Expand Down

0 comments on commit 6cee3d6

Please sign in to comment.