On 07/03/2013 09:53 PM, Ashish Myles wrote:
> hello.rs:4:8: 4:33 error: borrowed value does not live long enough
I was just about to write asking about this. I discovered it with the
following code:
for sorted_keys(dict).iter().advance |key| { ... }
The result of sorted_keys is a temporary vector, which doesn't seem to
live long enough for the iterator. If I give the temporary a name,
everything works as expected.
--
Tommy M. McGuire
[email protected]
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev