Add inline.
This commit is contained in:
@@ -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<LocalDefId> {
|
||||
if self.local_id.index() == 0 { Some(self.owner) } else { None }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user