]> git.lizzy.rs Git - rust.git/commitdiff
Inline LocalExpnId::from_raw and LocalExpnId::as_raw
authorTomasz Miąsko <tomasz.miasko@gmail.com>
Tue, 15 Feb 2022 00:00:00 +0000 (00:00 +0000)
committerTomasz Miąsko <tomasz.miasko@gmail.com>
Tue, 15 Feb 2022 18:08:12 +0000 (19:08 +0100)
compiler/rustc_span/src/hygiene.rs

index e0d6bd8cb7bba6f709f3942499d285e45a2e3c29..8265eb23c3db4a4de89c224116bd34fcca828342 100644 (file)
@@ -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())
     }