You can do "x = clean_up(x)" if the type isn't changing. But consider the 
common case of getting a port into a closure by wrapping it in a Cell. Then, 
what you really want is the port, not the cell. Here's a line from Servo's 
script_task:

  let (script_chan_copy, script_port) = (script_chan.clone(), 
Cell(script_port));

Cheers,
Tim

----- Original Message -----
From: "Corey Richardson" <[email protected]>
To: "John Clements" <[email protected]>
Cc: [email protected], "Gábor Horváth" <[email protected]>
Sent: Thursday, May 30, 2013 11:09:57 AM
Subject: Re: [rust-dev] Variables with the same name in the same scope

I think there should be a lint pass to check for it, I guess
defaulting to warn, John brings up a good point. But it seems weird to
me, since you can't just do "x = clean_up(x)".
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to