mirror of
https://github.com/nkbai/book.git
synced 2026-09-03 21:22:46 +08:00
Fixes outdated links to docs
This commit is contained in:
@@ -203,7 +203,7 @@ In Rust, pointers (called [_raw pointers_]) exist but are only used in specific
|
||||
circumstances, as dereferencing them is always considered `unsafe` -- Rust
|
||||
cannot provide its usual guarantees about what might be behind the pointer.
|
||||
|
||||
[_raw pointers_]: https://doc.rust-lang.org/book/second-edition/ch19-01-unsafe-rust.html#dereferencing-a-raw-pointer
|
||||
[_raw pointers_]: https://doc.rust-lang.org/book/ch19-01-unsafe-rust.html#dereferencing-a-raw-pointer
|
||||
|
||||
In most cases, we instead use _references_, indicated by the `&` symbol, or
|
||||
_mutable references_, indicated by `&mut`. References behave similarly to
|
||||
|
||||
@@ -52,7 +52,7 @@ because without taking special care, you might trigger a race condition,
|
||||
where your access to the variable is interrupted halfway through by an
|
||||
interrupt which also accesses that variable.
|
||||
|
||||
[`static mut`]: https://doc.rust-lang.org/book/second-edition/ch19-01-unsafe-rust.html#accessing-or-modifying-a-mutable-static-variable
|
||||
[`static mut`]: https://doc.rust-lang.org/book/ch19-01-unsafe-rust.html#accessing-or-modifying-a-mutable-static-variable
|
||||
|
||||
For an example of how this behaviour can cause subtle errors in your code,
|
||||
consider an embedded program which counts rising edges of some input signal
|
||||
|
||||
Reference in New Issue
Block a user