We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
slice::from_ref
1 parent 9f8cd9d commit 165842bCopy full SHA for 165842b
src/libsyntax/ext/tt/macro_rules.rs
@@ -23,6 +23,7 @@ use log::debug;
23
use rustc_data_structures::fx::{FxHashMap};
24
use std::borrow::Cow;
25
use std::collections::hash_map::Entry;
26
+use std::slice;
27
28
use rustc_data_structures::sync::Lrc;
29
use errors::Applicability;
@@ -358,10 +359,10 @@ pub fn compile(
358
359
360
// don't abort iteration early, so that errors for multiple lhses can be reported
361
for lhs in &lhses {
- valid &= check_lhs_no_empty_seq(sess, &[lhs.clone()]);
362
+ valid &= check_lhs_no_empty_seq(sess, slice::from_ref(lhs));
363
valid &= check_lhs_duplicate_matcher_bindings(
364
sess,
- &[lhs.clone()],
365
+ slice::from_ref(lhs),
366
&mut FxHashMap::default(),
367
def.id
368
);
0 commit comments