about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-09-03 07:58:41 +0200
committerMatthias Krüger <matthias.krueger@famsik.de>2022-09-03 07:58:41 +0200
commit57198b549f20a63650113b11b806f535a9d35fbb (patch)
tree6c7098399fa2e4c3fbaec0847499292378d8f964 /compiler/rustc_parse/src/parser
parentb88e510cc886e4c367d90e1c7c36013a4bc0d6ab (diff)
downloadrust-57198b549f20a63650113b11b806f535a9d35fbb.tar.gz
rust-57198b549f20a63650113b11b806f535a9d35fbb.zip
remove redundant clones
Diffstat (limited to 'compiler/rustc_parse/src/parser')
-rw-r--r--compiler/rustc_parse/src/parser/attr_wrapper.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/attr_wrapper.rs b/compiler/rustc_parse/src/parser/attr_wrapper.rs
index f353ee6df9b..2e58605cf19 100644
--- a/compiler/rustc_parse/src/parser/attr_wrapper.rs
+++ b/compiler/rustc_parse/src/parser/attr_wrapper.rs
@@ -52,7 +52,7 @@ impl AttrWrapper {
     // Prepend `self.attrs` to `attrs`.
     // FIXME: require passing an NT to prevent misuse of this method
     pub(crate) fn prepend_to_nt_inner(self, attrs: &mut AttrVec) {
-        let mut self_attrs = self.attrs.clone();
+        let mut self_attrs = self.attrs;
         std::mem::swap(attrs, &mut self_attrs);
         attrs.extend(self_attrs);
     }