summary refs log tree commit diff
path: root/compiler/rustc_span/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-02-15 23:48:43 +0000
committerbors <bors@rust-lang.org>2022-02-15 23:48:43 +0000
commit393fdc10483da930cdbb00eabc3635030d2e776f (patch)
tree06051c3b994dc99715d7f294a525dd1c057d3d1c /compiler/rustc_span/src
parent09cb29c64c2a0e15debf2d6fca2bc7c71a682033 (diff)
parentea7142076194517f84a5b867bd49e62a814a8622 (diff)
downloadrust-393fdc10483da930cdbb00eabc3635030d2e776f.tar.gz
rust-393fdc10483da930cdbb00eabc3635030d2e776f.zip
Auto merge of #94021 - tmiasko:inline, r=nagisa
Inline a few trivial conversion functions
Diffstat (limited to 'compiler/rustc_span/src')
-rw-r--r--compiler/rustc_span/src/hygiene.rs2
1 files changed, 2 insertions, 0 deletions
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())
     }