diff --git a/src/builder.rs b/src/builder.rs index 2241e0ea3643..ebd6595b4382 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -225,7 +225,7 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> { let mut on_stack_param_indices = FxHashSet::default(); if let Some(indices) = self.on_stack_params.borrow().get(&gcc_func) { - on_stack_param_indices = indices.clone(); + on_stack_param_indices.clone_from(indices); } if all_args_match { diff --git a/src/debuginfo.rs b/src/debuginfo.rs index a485225a2560..7ca4743f4b8e 100644 --- a/src/debuginfo.rs +++ b/src/debuginfo.rs @@ -279,9 +279,9 @@ impl<'gcc, 'tcx> DebugInfoMethods<'tcx> for CodegenCx<'gcc, 'tcx> { ) -> Self::DILocation { let pos = span.lo(); let DebugLoc { file, line, col } = self.lookup_debug_loc(pos); - let loc = match &file.name { - rustc_span::FileName::Real(ref name) => match &name { - rustc_span::RealFileName::LocalPath(ref name) => { + let loc = match file.name { + rustc_span::FileName::Real(ref name) => match name.clone() { + rustc_span::RealFileName::LocalPath(name) => { if let Some(name) = name.to_str() { self.context.new_location(name, line as i32, col as i32) } else {