Rollup merge of #78733 - matthiaskrgr:cl11ppy, r=jyn514
fix a couple of clippy warnings: filter_next manual_strip redundant_static_lifetimes single_char_pattern unnecessary_cast unused_unit op_ref redundant_closure useless_conversion
This commit is contained in:
commit
8640360870
11 changed files with 14 additions and 21 deletions
|
@ -120,7 +120,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
|
|||
let move_out = self.move_data.moves[(*move_site).moi];
|
||||
let moved_place = &self.move_data.move_paths[move_out.path].place;
|
||||
// `*(_1)` where `_1` is a `Box` is actually a move out.
|
||||
let is_box_move = moved_place.as_ref().projection == &[ProjectionElem::Deref]
|
||||
let is_box_move = moved_place.as_ref().projection == [ProjectionElem::Deref]
|
||||
&& self.body.local_decls[moved_place.local].ty.is_box();
|
||||
|
||||
!is_box_move
|
||||
|
|
|
@ -63,7 +63,7 @@ impl<'tcx> MirPass<'tcx> for MatchBranchSimplification {
|
|||
};
|
||||
|
||||
// Check that destinations are identical, and if not, then don't optimize this block
|
||||
if &bbs[first].terminator().kind != &bbs[second].terminator().kind {
|
||||
if bbs[first].terminator().kind != bbs[second].terminator().kind {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue