Skip to content

Commit a1ff955

Browse files
authored
Rollup merge of rust-lang#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 rust-lang#128974
2 parents eb6026a + 5d681cf commit a1ff955

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_utils/src/ast_utils/ident_iter.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ impl From<&Attribute> for IdentIter {
3939
struct IdentCollector(Vec<Ident>);
4040

4141
impl Visitor<'_> for IdentCollector {
42-
fn visit_ident(&mut self, ident: Ident) {
43-
self.0.push(ident);
42+
fn visit_ident(&mut self, ident: &Ident) {
43+
self.0.push(*ident);
4444
}
4545
}

0 commit comments

Comments
 (0)