Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
fix compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
Anchen Li committed Nov 24, 2022
1 parent bb53281 commit 583b260
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ impl Rule for NoShoutyConstants {

return Some(State {
literal,
references: binding.all_references(model).next()?,
reference: binding.all_references(model).next()?,
});
}
}
Expand All @@ -128,7 +128,7 @@ impl Rule for NoShoutyConstants {
},
);

let node = state.reference.node();
let node = state.reference.syntax();
diag = diag.detail(node.text_trimmed_range(), "Used here.");

let diag = diag.note(
Expand All @@ -150,7 +150,7 @@ impl Rule for NoShoutyConstants {

if let Some(node) = state
.reference
.node()
.syntax()
.parent()?
.cast::<JsIdentifierExpression>()
{
Expand All @@ -160,7 +160,7 @@ impl Rule for NoShoutyConstants {
);
} else if let Some(node) = state
.reference
.node()
.syntax()
.parent()?
.cast::<JsShorthandPropertyObjectMember>()
{
Expand All @@ -169,7 +169,7 @@ impl Rule for NoShoutyConstants {
JsAnyObjectMemberName::JsLiteralMemberName(js_literal_member_name(
SyntaxToken::new_detached(
JsSyntaxKind::JS_LITERAL_MEMBER_NAME,
JsReferenceIdentifier::cast_ref(state.reference.node())?
JsReferenceIdentifier::cast_ref(state.reference.syntax())?
.value_token()
.ok()?
.text(),
Expand Down

0 comments on commit 583b260

Please sign in to comment.