diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-09-03 14:20:53 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-03 14:20:53 +0200 |
| commit | 01da61a9bf1e1e7079bee0609ed944646c99c2a0 (patch) | |
| tree | cd4cdf87c354eee7b8dc34a9f80eb7b816d981b4 /compiler/rustc_parse/src/parser | |
| parent | 3c2780cf16658c62371fd2a0047b5280a1a076fe (diff) | |
| parent | 57198b549f20a63650113b11b806f535a9d35fbb (diff) | |
| download | rust-01da61a9bf1e1e7079bee0609ed944646c99c2a0.tar.gz rust-01da61a9bf1e1e7079bee0609ed944646c99c2a0.zip | |
Rollup merge of #101365 - matthiaskrgr:clones2, r=fee1-dead
remove redundant clones
Diffstat (limited to 'compiler/rustc_parse/src/parser')
| -rw-r--r-- | compiler/rustc_parse/src/parser/attr_wrapper.rs | 2 |
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); } |
