Fix clippy::needless_borrow in the compiler
`x clippy compiler -Aclippy::all -Wclippy::needless_borrow --fix`. Then I had to remove a few unnecessary parens and muts that were exposed now.
This commit is contained in:
@@ -314,7 +314,7 @@ pub fn eval_in_interpreter<'mir, 'tcx>(
|
||||
is_static: bool,
|
||||
) -> ::rustc_middle::mir::interpret::EvalToAllocationRawResult<'tcx> {
|
||||
let res = ecx.load_mir(cid.instance.def, cid.promoted);
|
||||
match res.and_then(|body| eval_body_using_ecx(&mut ecx, cid, &body)) {
|
||||
match res.and_then(|body| eval_body_using_ecx(&mut ecx, cid, body)) {
|
||||
Err(error) => {
|
||||
let (error, backtrace) = error.into_parts();
|
||||
backtrace.print_backtrace();
|
||||
|
||||
@@ -200,7 +200,7 @@ impl<'mir, 'tcx: 'mir> CompileTimeEvalContext<'mir, 'tcx> {
|
||||
&caller
|
||||
.file
|
||||
.name
|
||||
.for_scope(&self.tcx.sess, RemapPathScopeComponents::DIAGNOSTICS)
|
||||
.for_scope(self.tcx.sess, RemapPathScopeComponents::DIAGNOSTICS)
|
||||
.to_string_lossy(),
|
||||
),
|
||||
u32::try_from(caller.line).unwrap(),
|
||||
|
||||
@@ -387,7 +387,7 @@ fn valtree_into_mplace<'tcx>(
|
||||
|
||||
debug!(?place_inner);
|
||||
valtree_into_mplace(ecx, &place_inner, *inner_valtree);
|
||||
dump_place(&ecx, &place_inner);
|
||||
dump_place(ecx, &place_inner);
|
||||
}
|
||||
|
||||
debug!("dump of place_adjusted:");
|
||||
|
||||
Reference in New Issue
Block a user