mozilla/rust — pull request #5795 by nikomatsakis (2013-04-09 05:26:22+00:00)
Title: Reason about nested free variables that appear in a function signature

Reason about nested free variables that appear in a function
signature. In a nutshell, the idea is to (1) report an error if, for
a region pointer `'a T`, the lifetime `'a` is longer than any
lifetimes that appear in `T` (in other words, if a borrowed pointer
outlives any portion of its contents) and then (2) use this to assume
that in a function like `fn(self: &'a &'b T)`, the relationship `'a <=
'b` holds. This is needed for #5656. Fixes #5728.

r? @pcwalton