about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/expr.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2021-10-07 22:31:33 +0200
committerMatthias Krüger <matthias.krueger@famsik.de>2021-10-07 22:31:33 +0200
commitff6601e0fc4dd05e337ebc4e0d3c741a0ef26078 (patch)
tree88f39d36cba3b6234885775178f915acf4aa6787 /compiler/rustc_parse/src/parser/expr.rs
parent0157cc977fd71297ce73e2f249321f5ba2555d42 (diff)
downloadrust-ff6601e0fc4dd05e337ebc4e0d3c741a0ef26078.tar.gz
rust-ff6601e0fc4dd05e337ebc4e0d3c741a0ef26078.zip
some clippy::perf fixes
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
-rw-r--r--compiler/rustc_parse/src/parser/expr.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs
index 79f46be73f6..3d29d305021 100644
--- a/compiler/rustc_parse/src/parser/expr.rs
+++ b/compiler/rustc_parse/src/parser/expr.rs
@@ -1096,7 +1096,7 @@ impl<'a> Parser<'a> {
             (Err(ref mut err), Some((mut snapshot, ExprKind::Path(None, path)))) => {
                 let name = pprust::path_to_string(&path);
                 snapshot.bump(); // `(`
-                match snapshot.parse_struct_fields(path.clone(), false, token::Paren) {
+                match snapshot.parse_struct_fields(path, false, token::Paren) {
                     Ok((fields, ..)) if snapshot.eat(&token::CloseDelim(token::Paren)) => {
                         // We have are certain we have `Enum::Foo(a: 3, b: 4)`, suggest
                         // `Enum::Foo { a: 3, b: 4 }` or `Enum::Foo(3, 4)`.