hir: Remove the generic type parameter from MaybeOwned

It's only ever used with a reference to `OwnerInfo` as an argument.
This commit is contained in:
Vadim Petrochenkov
2024-02-03 15:50:14 +03:00
parent bf3c6c5bed
commit c5eca333fc
5 changed files with 17 additions and 32 deletions

View File

@@ -99,7 +99,7 @@ struct LoweringContext<'a, 'hir> {
/// Attributes inside the owner being lowered.
attrs: SortedMap<hir::ItemLocalId, &'hir [Attribute]>,
/// Collect items that were created by lowering the current owner.
children: Vec<(LocalDefId, hir::MaybeOwner<&'hir hir::OwnerInfo<'hir>>)>,
children: Vec<(LocalDefId, hir::MaybeOwner<'hir>)>,
coroutine_kind: Option<hir::CoroutineKind>,
@@ -415,7 +415,7 @@ fn index_crate<'a>(
/// This hash will then be part of the crate_hash which is stored in the metadata.
fn compute_hir_hash(
tcx: TyCtxt<'_>,
owners: &IndexSlice<LocalDefId, hir::MaybeOwner<&hir::OwnerInfo<'_>>>,
owners: &IndexSlice<LocalDefId, hir::MaybeOwner<'_>>,
) -> Fingerprint {
let mut hir_body_nodes: Vec<_> = owners
.iter_enumerated()