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

@ -3508,7 +3508,7 @@ impl<'hir> Node<'hir> {
/// ```ignore (illustrative)
/// ctor
/// .ctor_hir_id()
/// .and_then(|ctor_id| tcx.hir().find_parent(ctor_id))
/// .map(|ctor_id| tcx.parent_hir_node(ctor_id))
/// .and_then(|parent| parent.ident())
/// ```
pub fn ident(&self) -> Option<Ident> {