mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-05-31 06:37:39 +02:00
Remove confusing speaker note from Shared-References slide (#2659)
Dangling references are discussed later in the "Borrowing" segment. Fixes #2656
This commit is contained in:
parent
1a64c9ba9a
commit
08c613326a
@ -53,10 +53,9 @@ value.
|
||||
that value was mutable. Try `*r = 'X'`.
|
||||
|
||||
- Rust is tracking the lifetimes of all references to ensure they live long
|
||||
enough. Dangling references cannot occur in safe Rust. `x_axis` would return a
|
||||
reference to `point`, but `point` will be deallocated when the function
|
||||
returns, so this will not compile.
|
||||
enough. Dangling references cannot occur in safe Rust.
|
||||
|
||||
- We will talk more about borrowing when we get to ownership.
|
||||
- We will talk more about borrowing and preventing dangling references when we
|
||||
get to ownership.
|
||||
|
||||
</details>
|
||||
|
Loading…
x
Reference in New Issue
Block a user