From ea7142076194517f84a5b867bd49e62a814a8622 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Mi=C4=85sko?= Date: Tue, 15 Feb 2022 00:00:00 +0000 Subject: [PATCH] Inline LocalExpnId::from_raw and LocalExpnId::as_raw --- compiler/rustc_span/src/hygiene.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/rustc_span/src/hygiene.rs b/compiler/rustc_span/src/hygiene.rs index e0d6bd8cb7b..8265eb23c3d 100644 --- a/compiler/rustc_span/src/hygiene.rs +++ b/compiler/rustc_span/src/hygiene.rs @@ -172,10 +172,12 @@ impl LocalExpnId { /// The ID of the theoretical expansion that generates freshly parsed, unexpanded AST. pub const ROOT: LocalExpnId = LocalExpnId::from_u32(0); + #[inline] pub fn from_raw(idx: ExpnIndex) -> LocalExpnId { LocalExpnId::from_u32(idx.as_u32()) } + #[inline] pub fn as_raw(self) -> ExpnIndex { ExpnIndex::from_u32(self.as_u32()) }