Fix span of field ident string expression
This commit is contained in:
parent
ca979edd7c
commit
9591b23082
1 changed files with 2 additions and 2 deletions
|
|
@ -95,7 +95,7 @@ impl Field {
|
|||
// -> `expr s0 [ s1 ident_str ]`
|
||||
let ident_str = Expr::Lit(Lit::String(StringLit {
|
||||
elems: vec![StringLitElem::Plain(ident.name)],
|
||||
span,
|
||||
span: ident.span,
|
||||
}));
|
||||
let new = Expr::Field(Self::Access {
|
||||
expr,
|
||||
|
|
@ -122,7 +122,7 @@ impl Field {
|
|||
// -> `expr s0 [ s1 ident_str ] s2 = s3 value`
|
||||
let ident_str = Expr::Lit(Lit::String(StringLit {
|
||||
elems: vec![StringLitElem::Plain(ident.name)],
|
||||
span,
|
||||
span: ident.span,
|
||||
}));
|
||||
let new = Expr::Field(Self::Assign {
|
||||
expr,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue