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
|
|
@ -39,7 +39,7 @@ impl From<&Attribute> for IdentIter {
|
|||
struct IdentCollector(Vec<Ident>);
|
||||
|
||||
impl Visitor<'_> for IdentCollector {
|
||||
fn visit_ident(&mut self, ident: Ident) {
|
||||
self.0.push(ident);
|
||||
fn visit_ident(&mut self, ident: &Ident) {
|
||||
self.0.push(*ident);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue