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:
parent
0ff8610964
commit
21a870515b
304 changed files with 1101 additions and 1174 deletions
|
@ -95,7 +95,7 @@ impl<'tcx> MirPass<'tcx> for JumpThreading {
|
|||
|
||||
let cost = CostChecker::new(tcx, param_env, None, body);
|
||||
|
||||
let mut state = State::new(ConditionSet::default(), &finder.map);
|
||||
let mut state = State::new(ConditionSet::default(), finder.map);
|
||||
|
||||
let conds = if let Some((value, then, else_)) = targets.as_static_if() {
|
||||
let Some(value) = ScalarInt::try_from_uint(value, discr_layout.size) else {
|
||||
|
@ -112,7 +112,7 @@ impl<'tcx> MirPass<'tcx> for JumpThreading {
|
|||
}))
|
||||
};
|
||||
let conds = ConditionSet(conds);
|
||||
state.insert_value_idx(discr, conds, &finder.map);
|
||||
state.insert_value_idx(discr, conds, finder.map);
|
||||
|
||||
finder.find_opportunity(bb, state, cost, 0);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue