about summary refs log tree commit diff
path: root/src/librustc_ast_lowering/expr.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2020-01-16 23:15:52 +0100
committerMatthias Krüger <matthias.krueger@famsik.de>2020-01-16 23:48:49 +0100
commit7fbd30b1ae0ce9293302bbf4bfb814f1dc791107 (patch)
tree5499d1a8da34237b9e85748fa9fa5ed903e0e3b4 /src/librustc_ast_lowering/expr.rs
parent48840618382eccb8a799320c8e5d08e3b52f4c42 (diff)
downloadrust-7fbd30b1ae0ce9293302bbf4bfb814f1dc791107.tar.gz
rust-7fbd30b1ae0ce9293302bbf4bfb814f1dc791107.zip
don't clone types that are copy
found via clippy
Diffstat (limited to 'src/librustc_ast_lowering/expr.rs')
-rw-r--r--src/librustc_ast_lowering/expr.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_ast_lowering/expr.rs b/src/librustc_ast_lowering/expr.rs
index 9a229e709a5..2866a1624de 100644
--- a/src/librustc_ast_lowering/expr.rs
+++ b/src/librustc_ast_lowering/expr.rs
@@ -909,18 +909,18 @@ impl<'hir> LoweringContext<'_, 'hir> {
 
     fn lower_expr_asm(&mut self, asm: &InlineAsm) -> hir::ExprKind<'hir> {
         let inner = hir::InlineAsmInner {
-            inputs: asm.inputs.iter().map(|&(ref c, _)| c.clone()).collect(),
+            inputs: asm.inputs.iter().map(|&(c, _)| c).collect(),
             outputs: asm
                 .outputs
                 .iter()
                 .map(|out| hir::InlineAsmOutput {
-                    constraint: out.constraint.clone(),
+                    constraint: out.constraint,
                     is_rw: out.is_rw,
                     is_indirect: out.is_indirect,
                     span: out.expr.span,
                 })
                 .collect(),
-            asm: asm.asm.clone(),
+            asm: asm.asm,
             asm_str_style: asm.asm_str_style,
             clobbers: asm.clobbers.clone().into(),
             volatile: asm.volatile,