Use interpolated_or_expr_span
in one suitable place.
This commit is contained in:
parent
dee6c9241f
commit
9167eea553
1 changed files with 1 additions and 7 deletions
|
@ -193,13 +193,7 @@ impl<'a> Parser<'a> {
|
|||
|
||||
self.expected_tokens.push(TokenType::Operator);
|
||||
while let Some(op) = self.check_assoc_op() {
|
||||
// Adjust the span for interpolated LHS to point to the `$lhs` token
|
||||
// and not to what it refers to.
|
||||
let lhs_span = match self.prev_token.kind {
|
||||
TokenKind::Interpolated(..) => self.prev_token.span,
|
||||
_ => lhs.span,
|
||||
};
|
||||
|
||||
let lhs_span = self.interpolated_or_expr_span(&lhs);
|
||||
let cur_op_span = self.token.span;
|
||||
let restrictions = if op.node.is_assign_like() {
|
||||
self.restrictions & Restrictions::NO_STRUCT_LITERAL
|
||||
|
|
Loading…
Add table
Reference in a new issue