Re:Rust 0.12.0 released
by thristian on Thursday October 09, 2014 @05:43PM
(#8435164)
What if you're looking up the input in a temporary cache of some kind, and returning a reference to the cached value? The lifetime of the input and output would not be related in that scenario, but the output would not necessarily be 'static (maybe you build a cache, run some functions, tear it all down, then build a new cache with different values and do it all again).
[ Parent
| on HN ]
Re:Rust 0.12.0 released
by steveklabnik on Thursday October 09, 2014 @06:04PM
(#8435260)
The lifetime would be matched to the lifetime of the cache, which has to be referred to somehow.