From af8e97d00ee14fa693f81b3352794a3a380fd790 Mon Sep 17 00:00:00 2001 From: Simon Friis Vindum Date: Tue, 14 Feb 2023 19:30:40 +0100 Subject: [PATCH] Fix typo in ch10-03 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The "if" is misplaced. Rust definitely deterministically applies the rules 😃 --- src/ch10-03-lifetime-syntax.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ch10-03-lifetime-syntax.md b/src/ch10-03-lifetime-syntax.md index 5229ab74b3..6c93260898 100644 --- a/src/ch10-03-lifetime-syntax.md +++ b/src/ch10-03-lifetime-syntax.md @@ -432,11 +432,11 @@ 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 -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. +The elision rules don’t provide full inference. If there is still ambiguity as +to what lifetimes the references have after Rust applies the rules, 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. Lifetimes on function or method parameters are called *input lifetimes*, and lifetimes on return values are called *output lifetimes*.