Rollup merge of #108104 - matthiaskrgr:into, r=compiler-errors

don't into self

don't into()-convert types to themselves
This commit is contained in:
Matthias Krüger 2023-02-17 00:19:36 +01:00 committed by GitHub
commit 9b2ee4192e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 5 deletions

View File

@ -125,11 +125,11 @@ pub fn super_combine_tys<R>(
}
(ty::Alias(AliasKind::Projection, _), _) if self.tcx.trait_solver_next() => {
relation.register_type_equate_obligation(a.into(), b.into());
relation.register_type_equate_obligation(a, b);
Ok(b)
}
(_, ty::Alias(AliasKind::Projection, _)) if self.tcx.trait_solver_next() => {
relation.register_type_equate_obligation(b.into(), a.into());
relation.register_type_equate_obligation(b, a);
Ok(a)
}

View File

@ -47,8 +47,7 @@ fn has_back_edge(
return false;
}
// Check if any of the dominators of the node are also the node's successor.
doms.dominators(node)
.any(|dom| node_data.terminator().successors().into_iter().any(|succ| succ == dom))
doms.dominators(node).any(|dom| node_data.terminator().successors().any(|succ| succ == dom))
}
fn insert_counter(basic_block_data: &mut BasicBlockData<'_>) {

View File

@ -129,7 +129,7 @@ fn external_generic_args<'tcx>(
});
GenericArgs::Parenthesized { inputs, output }
} else {
GenericArgs::AngleBracketed { args: args.into(), bindings: bindings.into() }
GenericArgs::AngleBracketed { args: args.into(), bindings }
}
}