The lifetime of a reference, written 'a, is the region of the program in which the reference may be used. It must lie within the lifetime of the object referred to, the span from its creation to its drop or move (the lifetime of an object in Book 3’s sense). A function whose result is a reference names, by lifetime parameters in its signature, the arguments the result may borrow from.
longest_scope.rs, as vertical bars over its source lines. The result must be valid at the println!, line 7, but it may borrow from b, which is dropped at the end of line 6: no region 'a lies within both, and the program is refused.