diff options
| author | maxcabrajac <max@cabrajac.com> | 2024-10-24 10:41:44 -0300 |
|---|---|---|
| committer | maxcabrajac <max@cabrajac.com> | 2024-10-24 11:10:49 -0300 |
| commit | 64a34518356426beb5ab8f89c2ef754f3ac03614 (patch) | |
| tree | 7dbad1f3bf2e555c0210bfc3c2a3e87650876d1e /src | |
| parent | 5ae4d75effa366176dd75cd0d5662da26385cfc5 (diff) | |
| download | rust-64a34518356426beb5ab8f89c2ef754f3ac03614.tar.gz rust-64a34518356426beb5ab8f89c2ef754f3ac03614.zip | |
Pass Ident by reference in ast Visitor
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/clippy/clippy_utils/src/ast_utils/ident_iter.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/clippy/clippy_utils/src/ast_utils/ident_iter.rs b/src/tools/clippy/clippy_utils/src/ast_utils/ident_iter.rs index 032cd3ed739..22b2c895f7c 100644 --- a/src/tools/clippy/clippy_utils/src/ast_utils/ident_iter.rs +++ b/src/tools/clippy/clippy_utils/src/ast_utils/ident_iter.rs @@ -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); } } |
