Closed
Description
The related piece of code is
// libsyntax/parse/parser.rs:2104
if try!(self.eat_keyword(keywords::Move) ){
return self.parse_lambda_expr(CaptureByValue);
}
Since move
got eaten, self.span.lo
will point behind the move
// libsyntax/parse/parser.rs:2864
pub fn parse_lambda_expr(&mut self, capture_clause: CaptureClause)
-> PResult<P<Expr>>
{
let lo = self.span.lo;
I don't know anything about the code in libsyntax. I'd probably make a mess of it.
My intuition says simply adding self.span.lo = lo;
just before the return self.parse_lambda_expr(CaptureByValue);
might not be the best idea, since other code might depend on lo
not getting modified here.