about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorPietro Albini <pietro@pietroalbini.org>2018-12-05 23:54:30 +0100
committerGitHub <noreply@github.com>2018-12-05 23:54:30 +0100
commit4ff4fc1bc93f54839e6dfa56bc2e87b686a74094 (patch)
tree9dc5781601c1222a6d1d3e291e18d07ebd8b20d8 /src/libsyntax
parent21ba28f1c626e650c886c822efc318084644f1e8 (diff)
parentbc7c3dc71de785da813784bafaa490f12d4d7cfe (diff)
downloadrust-4ff4fc1bc93f54839e6dfa56bc2e87b686a74094.tar.gz
rust-4ff4fc1bc93f54839e6dfa56bc2e87b686a74094.zip
Rollup merge of #56452 - sinkuu:redundant_clone, r=nikic
Remove redundant clones
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ext/tt/macro_parser.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/ext/tt/macro_parser.rs b/src/libsyntax/ext/tt/macro_parser.rs
index 8fd9590a664..68d94b43dba 100644
--- a/src/libsyntax/ext/tt/macro_parser.rs
+++ b/src/libsyntax/ext/tt/macro_parser.rs
@@ -309,7 +309,7 @@ fn create_matches(len: usize) -> Box<[Rc<NamedMatchVec>]> {
         vec![]
     } else {
         let empty_matches = Rc::new(SmallVec::new());
-        vec![empty_matches.clone(); len]
+        vec![empty_matches; len]
     }.into_boxed_slice()
 }