1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2024-12-04 03:25:08 +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
commit c2462b4af0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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.