about summary refs log tree commit diff
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2016-01-28 00:48:31 +0530
committerManish Goregaokar <manishsmail@gmail.com>2016-01-28 00:48:31 +0530
commitb29628ac914562a649aa9beeacdba5ffe0041f41 (patch)
tree0b5f9a39e512918f900d88329b6581687c272154
parentb2f4c5c596524ceb7b7dcbf6e87105c81a2fa7ac (diff)
parent5a14f3791db8b87a5e292a72dc1086cb0e72e93b (diff)
Rollup merge of #30689 - Manishearth:lifetime-bound, r=steveklabnik
We should have stuff on this in the book somewhere too

r? @steveklabnik
-rw-r--r--src/doc/book/syntax-index.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/doc/book/syntax-index.md b/src/doc/book/syntax-index.md
index f7e32943c63..8116247c766 100644
--- a/src/doc/book/syntax-index.md
+++ b/src/doc/book/syntax-index.md
@@ -132,7 +132,8 @@
 <!-- Constraints -->
 
 * `T: U`: generic parameter `T` constrained to types that implement `U`.  See [Traits].
-* `T: 'a`: generic type `T` must outlive lifetime `'a`.
+* `T: 'a`: generic type `T` must outlive lifetime `'a`. When we say that a type 'outlives' the lifetime, we mean that it cannot transitively contain any references with lifetimes shorter than `'a`.
+* `T : 'static`: The generic type `T` contains no borrowed references other than `'static` ones.
 * `'b: 'a`: generic lifetime `'b` must outlive lifetime `'a`.
 * `T: ?Sized`: allow generic type parameter to be a dynamically-sized type.  See [Unsized Types (`?Sized`)].
 * `'a + trait`, `trait + trait`: compound type constraint.  See [Traits (Multiple Trait Bounds)].