1
Fork 0

get_parent and find_parent

This commit is contained in:
Michael Goulet 2023-01-03 17:30:35 +00:00
parent 6af339dbfa
commit b1b19bd851
29 changed files with 88 additions and 95 deletions

View file

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