]> git.lizzy.rs Git - rust.git/commitdiff
Improve syntax-index entry for lifetime bounds
authorManish Goregaokar <manishsmail@gmail.com>
Mon, 4 Jan 2016 04:01:29 +0000 (09:31 +0530)
committerManish Goregaokar <manishsmail@gmail.com>
Mon, 4 Jan 2016 04:04:32 +0000 (09:34 +0530)
src/doc/book/syntax-index.md

index f7e32943c638e470b76d4930f69a71009022a42f..8116247c7668ea785146dfd65ae82155c38d0b91 100644 (file)
 <!-- 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)].