Skip to content

Commit ea71420

Browse files
committed
Inline LocalExpnId::from_raw and LocalExpnId::as_raw
1 parent 81f12eb commit ea71420

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compiler/rustc_span/src/hygiene.rs

+2
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,12 @@ impl LocalExpnId {
172172
/// The ID of the theoretical expansion that generates freshly parsed, unexpanded AST.
173173
pub const ROOT: LocalExpnId = LocalExpnId::from_u32(0);
174174

175+
#[inline]
175176
pub fn from_raw(idx: ExpnIndex) -> LocalExpnId {
176177
LocalExpnId::from_u32(idx.as_u32())
177178
}
178179

180+
#[inline]
179181
pub fn as_raw(self) -> ExpnIndex {
180182
ExpnIndex::from_u32(self.as_u32())
181183
}

0 commit comments

Comments
 (0)