diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2020-02-24 14:48:40 +0100 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2020-02-24 14:56:29 +0100 |
| commit | d4a005bd03dd2ef229bb809d128f9b31c159c18e (patch) | |
| tree | 112465f9ea30d8ce757e2b4a3404695087ce115e /src/librustc_codegen_ssa | |
| parent | 5ae4500eff740b5935fc24b23e3c4be9789caf37 (diff) | |
| download | rust-d4a005bd03dd2ef229bb809d128f9b31c159c18e.tar.gz rust-d4a005bd03dd2ef229bb809d128f9b31c159c18e.zip | |
librustc{, codegen_ssa,infer,mir_build}: don't clone types that are copy
Diffstat (limited to 'src/librustc_codegen_ssa')
| -rw-r--r-- | src/librustc_codegen_ssa/mir/constant.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_codegen_ssa/mir/constant.rs b/src/librustc_codegen_ssa/mir/constant.rs index 9ceb75a603b..4248627dcca 100644 --- a/src/librustc_codegen_ssa/mir/constant.rs +++ b/src/librustc_codegen_ssa/mir/constant.rs @@ -31,7 +31,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { _ => { let val = self.eval_mir_constant(constant)?; let ty = self.monomorphize(&constant.literal.ty); - Ok(OperandRef::from_const(bx, val.clone(), ty)) + Ok(OperandRef::from_const(bx, val, ty)) } } } |
