]> git.lizzy.rs Git - rust.git/commitdiff
Simplifying some of the phrasing explaining lifetime elision
authornicholasf <nicholas.faiz@gmail.com>
Tue, 22 Mar 2016 17:58:59 +0000 (04:58 +1100)
committernicholasf <nicholas.faiz@gmail.com>
Tue, 22 Mar 2016 18:00:27 +0000 (05:00 +1100)
src/doc/book/lifetimes.md

index 4193c93c894c4fec4a97b19aa3a5ce1ccf1b0509..e7a4045d9b2491fbee269f99b689d7c55fb856f3 100644 (file)
@@ -282,14 +282,12 @@ to it.
 
 ## Lifetime Elision
 
-Rust supports powerful local type inference in function bodies, but it’s
-forbidden in item signatures to allow reasoning about the types based on
-the item signature alone. However, for ergonomic reasons a very restricted
-secondary inference algorithm called “lifetime elision” applies in function
-signatures. It infers only based on the signature components themselves and not
-based on the body of the function, only infers lifetime parameters, and does
-this with only three easily memorizable and unambiguous rules. This makes
-lifetime elision a shorthand for writing an item signature, while not hiding
+Rust supports powerful local type inference in the bodies of functions but not in their item signatures. 
+It's forbidden to allow reasoning about types based on the item signature alone. 
+However, for ergonomic reasons, a very restricted secondary inference algorithm called 
+“lifetime elision” does apply when judging lifetimes. Lifetime elision is concerned solely to infer 
+lifetime parameters using three easily memorizable and unambiguous rules. This means lifetime elision 
+acts as a shorthand for writing an item signature, while not hiding
 away the actual types involved as full local inference would if applied to it.
 
 When talking about lifetime elision, we use the term *input lifetime* and