Skip to content

Commit

Permalink
Rollup merge of rust-lang#132106 - maxcabrajac:ident_ref, r=petrochenkov
Browse files Browse the repository at this point in the history
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 rust-lang#128974
  • Loading branch information
matthiaskrgr authored Oct 25, 2024
2 parents eb6026a + 5d681cf commit a1ff955
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clippy_utils/src/ast_utils/ident_iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit a1ff955

Please sign in to comment.