diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2021-12-10 13:23:48 +0100 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2022-01-15 21:26:25 +0100 |
| commit | 8617ff0f0bfc8ab8484f4ad970d63e0a787f954f (patch) | |
| tree | 1e2d540d7fb5b23e6567d2c766b4b1f5dfbef30e | |
| parent | d9c6e70c57d16b248b65ec578ca9b77028ea0725 (diff) | |
| download | rust-8617ff0f0bfc8ab8484f4ad970d63e0a787f954f.tar.gz rust-8617ff0f0bfc8ab8484f4ad970d63e0a787f954f.zip | |
Add inline.
| -rw-r--r-- | compiler/rustc_hir/src/hir_id.rs | 2 |
1 files changed, 2 insertions, 0 deletions
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<LocalDefId> { if self.local_id.index() == 0 { Some(self.owner) } else { None } } |
