1
Fork 0

Rollup merge of #120872 - petrochenkov:opthirpar, r=cjgillot

hir: Refactor getters for HIR parents

See individual commits.

I ended up removing on of the FIXMEs from https://github.com/rust-lang/rust/pull/120206 instead of addressing it.
This commit is contained in:
Matthias Krüger 2024-02-11 23:19:08 +01:00 committed by GitHub
commit 4c154a1a48
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
79 changed files with 263 additions and 342 deletions

View file

@ -792,7 +792,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
return id;
}
let next = hir.parent_id(id);
let next = self.tcx.parent_hir_id(id);
if next == id {
bug!("lint traversal reached the root of the crate");
}