diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-06-16 06:05:18 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-06-16 06:05:18 +0200 |
| commit | 2ba1d94f7a2579aeb68aa66ba304f23caaea85f1 (patch) | |
| tree | 7f0ae2f1a858ffad74bf937b80bbfa46a7182daa /src/libsyntax | |
| parent | af561116516bd1d5ed4a830e08dc5e74293f78fb (diff) | |
| parent | 6a0abd60486d7301dea849e7107bc92380e6045e (diff) | |
| download | rust-2ba1d94f7a2579aeb68aa66ba304f23caaea85f1.tar.gz rust-2ba1d94f7a2579aeb68aa66ba304f23caaea85f1.zip | |
Rollup merge of #61866 - sinkuu:redundant_clone, r=petrochenkov
Remove redundant `clone()`s
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ext/tt/macro_rules.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libsyntax/ext/tt/macro_rules.rs b/src/libsyntax/ext/tt/macro_rules.rs index 6b699464ba9..22745a1a76d 100644 --- a/src/libsyntax/ext/tt/macro_rules.rs +++ b/src/libsyntax/ext/tt/macro_rules.rs @@ -23,6 +23,7 @@ use log::debug; use rustc_data_structures::fx::{FxHashMap}; use std::borrow::Cow; use std::collections::hash_map::Entry; +use std::slice; use rustc_data_structures::sync::Lrc; use errors::Applicability; @@ -359,10 +360,10 @@ pub fn compile( // don't abort iteration early, so that errors for multiple lhses can be reported for lhs in &lhses { - valid &= check_lhs_no_empty_seq(sess, &[lhs.clone()]); + valid &= check_lhs_no_empty_seq(sess, slice::from_ref(lhs)); valid &= check_lhs_duplicate_matcher_bindings( sess, - &[lhs.clone()], + slice::from_ref(lhs), &mut FxHashMap::default(), def.id ); |
