1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-07-01 12:44:55 +02:00

Merge pull request #135 from fbornhofen/speaker-notes-fbornhofen-references

Add bullet point about mutable references
This commit is contained in:
Martin Geisler
2023-01-09 17:20:28 +01:00
committed by GitHub

View File

@ -16,3 +16,4 @@ Some differences from C++:
* We must dereference `ref_x` when assigning to it, similar to C pointers,
* Rust will auto-dereference in some cases, in particular when invoking
methods (try `count_ones`).
* References that are declared as `mut` can be bound to different values over their lifetime.