On 19/08/2014 15:09, Andrei Alexandrescu wrote:
There I fully agree. If they don't improve lifetime's usability, I don't
see Rust being adopted by average developers.

Could you please substantiate this with a couple of examples?

Here's an example I ran into playing with the last release. Maybe I'm doing something wrong though:

fn main()
{
    let mut x:uint = 0u;
    let f = ||x += 1;   // closure borrows x
if x == 1 {return} // error: cannot use `x` because it was mutably borrowed
    f();
}

This seems unnecessarily restrictive.

Reply via email to