mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-05-20 09:23:11 +02:00
parent
d6fbd215a1
commit
6ef577bcc7
@ -39,8 +39,8 @@ value.
|
||||
will recognize references as pointers. Later parts of the course will cover
|
||||
how Rust prevents the memory-safety bugs that come from using raw pointers.
|
||||
|
||||
- Rust does not automatically create references for you - the `&` is always
|
||||
required.
|
||||
- Explicit referencing with `&` is usually required. However, Rust performs
|
||||
automatic referencing and dereferencing when invoking methods.
|
||||
|
||||
- Rust will auto-dereference in some cases, in particular when invoking methods
|
||||
(try `r.is_ascii()`). There is no need for an `->` operator like in C++.
|
||||
|
Loading…
x
Reference in New Issue
Block a user