1
Fork 0

Auto merge of #109590 - Nilstrieb:copy-hir, r=oli-obk

Impl `Copy` for most HIR types

This simplifies the invocation of the `arena_types` macro and probably
makes working with HIR nicer in general.

Based on #109588
This commit is contained in:
bors 2023-04-24 03:10:55 +00:00
commit f65615f02d
4 changed files with 72 additions and 111 deletions

View file

@ -327,7 +327,7 @@ impl<'tcx> IrMaps<'tcx> {
pats.extend(inner_pat.iter());
}
Struct(_, fields, _) => {
let (short, not_short): (Vec<_>, _) =
let (short, not_short): (Vec<hir::PatField<'_>>, _) =
fields.iter().partition(|f| f.is_shorthand);
shorthand_field_ids.extend(short.iter().map(|f| f.pat.hir_id));
pats.extend(not_short.iter().map(|f| f.pat));