Skip to content

Commit ffc9082

Browse files
committed
Remove function from rebase
1 parent 83587e8 commit ffc9082

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

Diff for: compiler/rustc_hir/src/hir.rs

-28
Original file line numberDiff line numberDiff line change
@@ -3210,34 +3210,6 @@ impl<'hir> Node<'hir> {
32103210
}
32113211
}
32123212

3213-
pub fn hir_id(&self) -> Option<HirId> {
3214-
match self {
3215-
Node::Item(Item { def_id, .. })
3216-
| Node::TraitItem(TraitItem { def_id, .. })
3217-
| Node::ImplItem(ImplItem { def_id, .. })
3218-
| Node::ForeignItem(ForeignItem { def_id, .. }) => Some(HirId::make_owner(*def_id)),
3219-
Node::Field(FieldDef { hir_id, .. })
3220-
| Node::AnonConst(AnonConst { hir_id, .. })
3221-
| Node::Expr(Expr { hir_id, .. })
3222-
| Node::Stmt(Stmt { hir_id, .. })
3223-
| Node::Ty(Ty { hir_id, .. })
3224-
| Node::Binding(Pat { hir_id, .. })
3225-
| Node::Pat(Pat { hir_id, .. })
3226-
| Node::Arm(Arm { hir_id, .. })
3227-
| Node::Block(Block { hir_id, .. })
3228-
| Node::Local(Local { hir_id, .. })
3229-
| Node::Lifetime(Lifetime { hir_id, .. })
3230-
| Node::Param(Param { hir_id, .. })
3231-
| Node::Infer(InferArg { hir_id, .. })
3232-
| Node::GenericParam(GenericParam { hir_id, .. }) => Some(*hir_id),
3233-
Node::TraitRef(TraitRef { hir_ref_id, .. }) => Some(*hir_ref_id),
3234-
Node::PathSegment(PathSegment { hir_id, .. }) => *hir_id,
3235-
Node::Variant(Variant { id, .. }) => Some(*id),
3236-
Node::Ctor(variant) => variant.ctor_hir_id(),
3237-
Node::Crate(_) | Node::Visibility(_) => None,
3238-
}
3239-
}
3240-
32413213
pub fn as_owner(self) -> Option<OwnerNode<'hir>> {
32423214
match self {
32433215
Node::Item(i) => Some(OwnerNode::Item(i)),

0 commit comments

Comments
 (0)