diff --git a/compiler/rustc_hir/src/hir_id.rs b/compiler/rustc_hir/src/hir_id.rs index 1482a96cae3..5b486819c35 100644 --- a/compiler/rustc_hir/src/hir_id.rs +++ b/compiler/rustc_hir/src/hir_id.rs @@ -19,11 +19,13 @@ pub struct HirId { } impl HirId { + #[inline] pub fn expect_owner(self) -> LocalDefId { assert_eq!(self.local_id.index(), 0); self.owner } + #[inline] pub fn as_owner(self) -> Option { if self.local_id.index() == 0 { Some(self.owner) } else { None } }