mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-03-21 14:46:37 +02:00
commit
2a92487bbd
@ -36,4 +36,4 @@ fn main() {
|
||||
}
|
||||
```
|
||||
|
||||
We will look at mutating static data in the chapter on Unsafe Rust.
|
||||
We will look at mutating static data in the [chapter on Unsafe Rust](../unsafe.md).
|
||||
|
@ -6,13 +6,16 @@ The Rust language has two parts:
|
||||
* **Unsafe Rust:** can trigger undefined behavior if preconditions are violated.
|
||||
|
||||
We will be seeing mostly safe Rust in this course, but it's important to know
|
||||
what unsafe Rust is.
|
||||
what Unsafe Rust is.
|
||||
|
||||
Unsafe Rust gives you access to five new capabilities:
|
||||
|
||||
* Dereference raw pointers.
|
||||
* Access or modify mutable static variables.
|
||||
* Access `union` fields.
|
||||
* Call `unsafe` functions, including `extern` functions
|
||||
* Call `unsafe` functions, including `extern` functions.
|
||||
* Implement `unsafe` traits.
|
||||
|
||||
We will briefly cover these capabilities next. For full details, please see
|
||||
[Chapter 19.1 in the Rust Book](https://doc.rust-lang.org/book/ch19-01-unsafe-rust.html)
|
||||
and the [Rustonomicon](https://doc.rust-lang.org/nomicon/).
|
||||
|
@ -33,10 +33,6 @@ Some non-goals of this course are:
|
||||
* Learn how to develop macros, please see [Chapter 19.5 in the Rust
|
||||
Book](https://doc.rust-lang.org/book/ch19-06-macros.html) and [Rust by
|
||||
Example](https://doc.rust-lang.org/rust-by-example/macros.html) instead.
|
||||
* Learn the details of how to write unsafe Rust. We will talk about unsafe Rust
|
||||
on Day 3, but we do not cover the subtle details. Please see [Chapter 19.1 in
|
||||
the Rust Book](https://doc.rust-lang.org/book/ch19-01-unsafe-rust.html) and
|
||||
the [Rustonomicon](https://doc.rust-lang.org/nomicon/) instead.
|
||||
|
||||
## Assumptions
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user