Compare commits

...

2 Commits

Author SHA1 Message Date
Simon Friis Vindum 0d3e239bac
Merge c3063d0913 into 8a79f3e15d 2024-04-19 15:41:41 -04:00
Simon Friis Vindum c3063d0913
Fix typo in ch10-03
The "if" is misplaced. Rust definitely deterministically applies the rules 😃
2023-02-14 19:30:40 +01:00
1 changed files with 2 additions and 2 deletions

View File

@ -432,8 +432,8 @@ The patterns programmed into Rusts analysis of references are called the
a set of particular cases that the compiler will consider, and if your code
fits these cases, you dont need to write the lifetimes explicitly.
The elision rules dont provide full inference. If Rust deterministically
applies the rules but there is still ambiguity as to what lifetimes the
The elision rules dont provide full inference. Rust deterministically
applies the rules but if there is still ambiguity as to what lifetimes the
references have, the compiler wont guess what the lifetime of the remaining
references should be. Instead of guessing, the compiler will give you an error
that you can resolve by adding the lifetime annotations.