mirror of
https://github.com/rust-lang/rust
synced 2024-09-05 08:37:14 +00:00
Auto merge of #29141 - marcusklaas:pat-expr, r=alexcrichton
Closes https://github.com/rust-lang/rust/issues/29120.
This commit is contained in:
commit
d3f497861d
|
@ -1583,11 +1583,11 @@ pub fn parse_literal_maybe_minus(&mut self) -> PResult<P<Expr>> {
|
|||
|
||||
let lo = self.span.lo;
|
||||
let literal = P(try!(self.parse_lit()));
|
||||
let hi = self.span.hi;
|
||||
let hi = self.last_span.hi;
|
||||
let expr = self.mk_expr(lo, hi, ExprLit(literal));
|
||||
|
||||
if minus_present {
|
||||
let minus_hi = self.span.hi;
|
||||
let minus_hi = self.last_span.hi;
|
||||
let unary = self.mk_unary(UnNeg, expr);
|
||||
Ok(self.mk_expr(minus_lo, minus_hi, unary))
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue