Auto merge of #110405 - fee1-dead-contrib:rollup-9rkree6, r=fee1-dead

Rollup of 4 pull requests

Successful merges:

 - #110397 (Move some utils out of `rustc_const_eval`)
 - #110398 (use matches! macro in more places)
 - #110400 (more clippy fixes: clippy::{iter_cloned_collect, unwarp_or_else_defau…)
 - #110402 (Remove the loop in `Align::from_bytes`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
This commit is contained in:
bors 2023-04-16 13:12:53 +00:00
commit 8a778ca1e3
33 changed files with 91 additions and 114 deletions

View file

@ -1317,7 +1317,7 @@ fn compare_number_of_generics<'tcx>(
impl_count,
kind,
pluralize!(impl_count),
suffix.unwrap_or_else(String::new),
suffix.unwrap_or_default(),
),
);
}

View file

@ -1457,10 +1457,7 @@ fn compute_sig_of_foreign_fn_decl<'tcx>(
}
fn is_foreign_item(tcx: TyCtxt<'_>, def_id: LocalDefId) -> bool {
match tcx.hir().get_by_def_id(def_id) {
Node::ForeignItem(..) => true,
_ => false,
}
matches!(tcx.hir().get_by_def_id(def_id), Node::ForeignItem(..))
}
fn generator_kind(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Option<hir::GeneratorKind> {