diff options
| author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2021-06-01 00:00:00 +0000 |
|---|---|---|
| committer | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2021-06-02 08:49:58 +0200 |
| commit | c1f6495b8e19325a57702a7ce016e6d5a3f25e26 (patch) | |
| tree | 32e2416abac1af9db40a68fbc609259923f0a4d1 /compiler/rustc_span/src | |
| parent | c4f186f0ea443db4aacdd90a2515632c20ccd3fe (diff) | |
| download | rust-c1f6495b8e19325a57702a7ce016e6d5a3f25e26.tar.gz rust-c1f6495b8e19325a57702a7ce016e6d5a3f25e26.zip | |
Miscellaneous inlining improvements
Diffstat (limited to 'compiler/rustc_span/src')
| -rw-r--r-- | compiler/rustc_span/src/def_id.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_span/src/def_id.rs b/compiler/rustc_span/src/def_id.rs index 85aba67c5e2..b04a10d22a0 100644 --- a/compiler/rustc_span/src/def_id.rs +++ b/compiler/rustc_span/src/def_id.rs @@ -20,10 +20,12 @@ rustc_index::newtype_index! { pub const LOCAL_CRATE: CrateNum = CrateNum::from_u32(0); impl CrateNum { + #[inline] pub fn new(x: usize) -> CrateNum { CrateNum::from_usize(x) } + #[inline] pub fn as_def_id(&self) -> DefId { DefId { krate: *self, index: CRATE_DEF_INDEX } } |
