mirror of https://github.com/rust-lang/book
Compare commits
2 Commits
028a16d2a0
...
0d3e239bac
Author | SHA1 | Date |
---|---|---|
Simon Friis Vindum | 0d3e239bac | |
Simon Friis Vindum | c3063d0913 |
|
@ -432,8 +432,8 @@ The patterns programmed into Rust’s analysis of references are called the
|
|||
a set of particular cases that the compiler will consider, and if your code
|
||||
fits these cases, you don’t need to write the lifetimes explicitly.
|
||||
|
||||
The elision rules don’t provide full inference. If Rust deterministically
|
||||
applies the rules but there is still ambiguity as to what lifetimes the
|
||||
The elision rules don’t provide full inference. Rust deterministically
|
||||
applies the rules but if there is still ambiguity as to what lifetimes the
|
||||
references have, the compiler won’t 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.
|
||||
|
|
Loading…
Reference in New Issue