Skip to content

Commit

Permalink
Use preinterned path symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
clubby789 committed Nov 27, 2024
1 parent 8cb2820 commit 3961596
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/visitor.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use rustc_ast::ast;
use rustc_ast::visit::Visitor;
use rustc_span::Symbol;
use rustc_span::{sym, Symbol};
use tracing::debug;

use crate::attr::MetaVisitor;
Expand Down Expand Up @@ -90,7 +90,7 @@ impl<'ast> MetaVisitor<'ast> for PathVisitor {
meta_item: &'ast ast::MetaItem,
lit: &'ast ast::MetaItemLit,
) {
if meta_item.has_name(Symbol::intern("path")) && lit.kind.is_str() {
if meta_item.has_name(sym::path) && lit.kind.is_str() {
self.paths.push(meta_item_lit_to_str(lit));
}
}
Expand Down

0 comments on commit 3961596

Please sign in to comment.