Don't pass &mut where immutable reference (&) is sufficient (clippy::unnecessary_mut_passed)
This commit is contained in:
parent
8ba92d9ce4
commit
84577c86bf
3 changed files with 7 additions and 7 deletions
|
|
@ -150,7 +150,7 @@ impl<'tcx> AutoTraitFinder<'tcx> {
|
|||
// SelectionContext to return it back to us.
|
||||
|
||||
let (new_env, user_env) = match self.evaluate_predicates(
|
||||
&mut infcx,
|
||||
&infcx,
|
||||
trait_did,
|
||||
ty,
|
||||
orig_env,
|
||||
|
|
|
|||
|
|
@ -22,20 +22,20 @@ pub fn visit_results<F>(
|
|||
let loc = Location { block, statement_index };
|
||||
|
||||
results.reconstruct_before_statement_effect(&mut state, stmt, loc);
|
||||
vis.visit_statement(&mut state, stmt, loc);
|
||||
vis.visit_statement(&state, stmt, loc);
|
||||
|
||||
results.reconstruct_statement_effect(&mut state, stmt, loc);
|
||||
vis.visit_statement_exit(&mut state, stmt, loc);
|
||||
vis.visit_statement_exit(&state, stmt, loc);
|
||||
}
|
||||
|
||||
let loc = body.terminator_loc(block);
|
||||
let term = block_data.terminator();
|
||||
|
||||
results.reconstruct_before_terminator_effect(&mut state, term, loc);
|
||||
vis.visit_terminator(&mut state, term, loc);
|
||||
vis.visit_terminator(&state, term, loc);
|
||||
|
||||
results.reconstruct_terminator_effect(&mut state, term, loc);
|
||||
vis.visit_terminator_exit(&mut state, term, loc);
|
||||
vis.visit_terminator_exit(&state, term, loc);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -737,8 +737,8 @@ impl ItemLikeVisitor<'tcx> for CheckItemTypesVisitor<'tcx> {
|
|||
}
|
||||
|
||||
pub fn check_wf_new(tcx: TyCtxt<'_>) {
|
||||
let mut visit = wfcheck::CheckTypeWellFormedVisitor::new(tcx);
|
||||
tcx.hir().krate().par_visit_all_item_likes(&mut visit);
|
||||
let visit = wfcheck::CheckTypeWellFormedVisitor::new(tcx);
|
||||
tcx.hir().krate().par_visit_all_item_likes(&visit);
|
||||
}
|
||||
|
||||
fn check_mod_item_types(tcx: TyCtxt<'_>, module_def_id: DefId) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue