about summary refs log tree commit diff
path: root/compiler/rustc_session
diff options
context:
space:
mode:
authorTomasz Miąsko <tomasz.miasko@gmail.com>2021-02-26 00:00:00 +0000
committerTomasz Miąsko <tomasz.miasko@gmail.com>2021-02-26 00:00:00 +0000
commit481e1fd3a8152cc72b561089c358e3b40c0eb54f (patch)
treef64577c45caa4aae453113d73c1771f63dfc72e1 /compiler/rustc_session
parentcecdb181ade91c0a5ffab9a148dba68fc7d00ee3 (diff)
Miscellaneous inlining improvements
Inline a few small and hot functions.
Diffstat (limited to 'compiler/rustc_session')
-rw-r--r--compiler/rustc_session/src/session.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs
index 823aa61c470..493bbb3a762 100644
--- a/compiler/rustc_session/src/session.rs
+++ b/compiler/rustc_session/src/session.rs
@@ -77,6 +77,7 @@ impl Limit {
 
     /// Check that `value` is within the limit. Ensures that the same comparisons are used
     /// throughout the compiler, as mismatches can cause ICEs, see #72540.
+    #[inline]
     pub fn value_within_limit(&self, value: usize) -> bool {
         value <= self.0
     }
@@ -347,10 +348,12 @@ impl Session {
         self.crate_types.set(crate_types).expect("`crate_types` was initialized twice")
     }
 
+    #[inline]
     pub fn recursion_limit(&self) -> Limit {
         self.recursion_limit.get().copied().unwrap()
     }
 
+    #[inline]
     pub fn type_length_limit(&self) -> Limit {
         self.type_length_limit.get().copied().unwrap()
     }