get_parent and find_parent
This commit is contained in:
parent
6af339dbfa
commit
b1b19bd851
29 changed files with 88 additions and 95 deletions
|
@ -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> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue