Rollup merge of #132106 - maxcabrajac:ident_ref, r=petrochenkov
Pass Ident by reference in ast Visitor `MutVisitor`'s version of `visit_ident` passes around `&Ident`, but `Visitor` copies `Ident`. This PR changes that r? `@petrochenkov` related to #128974
This commit is contained in:
commit
280790b9a1
10 changed files with 41 additions and 41 deletions
|
@ -1894,11 +1894,11 @@ impl EarlyLintPass for KeywordIdents {
|
|||
fn check_mac(&mut self, cx: &EarlyContext<'_>, mac: &ast::MacCall) {
|
||||
self.check_tokens(cx, &mac.args.tokens);
|
||||
}
|
||||
fn check_ident(&mut self, cx: &EarlyContext<'_>, ident: Ident) {
|
||||
fn check_ident(&mut self, cx: &EarlyContext<'_>, ident: &Ident) {
|
||||
if ident.name.as_str().starts_with('\'') {
|
||||
self.check_ident_token(cx, UnderMacro(false), ident.without_first_quote(), "'");
|
||||
} else {
|
||||
self.check_ident_token(cx, UnderMacro(false), ident, "");
|
||||
self.check_ident_token(cx, UnderMacro(false), *ident, "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue