about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEduard-Mihai Burtescu <edy.burt@gmail.com>2016-03-23 17:59:15 +0200
committerEduard-Mihai Burtescu <edy.burt@gmail.com>2016-03-23 17:59:15 +0200
commitd7bf3d328457d6b49b1c92d752ef2022c0b0bded (patch)
treeb89a34b1130ed7db82d70caf95c3c6476e51ba9a
parent12e54bba216c8dfe4f2434ab5555d560d7699f74 (diff)
parent45c72d5f5bdec4827d539fc12e52297248f1d1ec (diff)
downloadrust-d7bf3d328457d6b49b1c92d752ef2022c0b0bded.tar.gz
rust-d7bf3d328457d6b49b1c92d752ef2022c0b0bded.zip
Rollup merge of #32431 - nicholasf:tweak/improve-expression, r=steveklabnik
Simplifying some of the phrasing explaining lifetime elision

Just simplifying some of the language expressing what kind of inference Rust can and can't do on function signatures.
-rw-r--r--src/doc/book/lifetimes.md14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/doc/book/lifetimes.md b/src/doc/book/lifetimes.md
index 4193c93c894..e7a4045d9b2 100644
--- a/src/doc/book/lifetimes.md
+++ b/src/doc/book/lifetimes.md
@@ -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