about summary refs log tree commit diff
path: root/compiler/rustc_span/src
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-11-02 15:22:51 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2023-11-02 19:35:04 +1100
commitedb357f91224da9106dca7de43947e7257db036d (patch)
treed0bb41465e931756af4db2dcda9fc19e743c7b00 /compiler/rustc_span/src
parentf405ce86c2a5daab5972876e5b7600afdc308643 (diff)
downloadrust-edb357f91224da9106dca7de43947e7257db036d.tar.gz
rust-edb357f91224da9106dca7de43947e7257db036d.zip
Deinline all session global functions.
These are all called very rarely, so there is no need for them to be
inline.
Diffstat (limited to 'compiler/rustc_span/src')
-rw-r--r--compiler/rustc_span/src/lib.rs6
1 files changed, 0 insertions, 6 deletions
diff --git a/compiler/rustc_span/src/lib.rs b/compiler/rustc_span/src/lib.rs
index 00323e93639..fc13bdff36f 100644
--- a/compiler/rustc_span/src/lib.rs
+++ b/compiler/rustc_span/src/lib.rs
@@ -119,7 +119,6 @@ impl SessionGlobals {
     }
 }
 
-#[inline]
 pub fn create_session_globals_then<R>(edition: Edition, f: impl FnOnce() -> R) -> R {
     assert!(
         !SESSION_GLOBALS.is_set(),
@@ -130,7 +129,6 @@ pub fn create_session_globals_then<R>(edition: Edition, f: impl FnOnce() -> R) -
     SESSION_GLOBALS.set(&session_globals, f)
 }
 
-#[inline]
 pub fn set_session_globals_then<R>(session_globals: &SessionGlobals, f: impl FnOnce() -> R) -> R {
     assert!(
         !SESSION_GLOBALS.is_set(),
@@ -140,7 +138,6 @@ pub fn set_session_globals_then<R>(session_globals: &SessionGlobals, f: impl FnO
     SESSION_GLOBALS.set(session_globals, f)
 }
 
-#[inline]
 pub fn create_default_session_if_not_set_then<R, F>(f: F) -> R
 where
     F: FnOnce(&SessionGlobals) -> R,
@@ -148,7 +145,6 @@ where
     create_session_if_not_set_then(edition::DEFAULT_EDITION, f)
 }
 
-#[inline]
 pub fn create_session_if_not_set_then<R, F>(edition: Edition, f: F) -> R
 where
     F: FnOnce(&SessionGlobals) -> R,
@@ -161,7 +157,6 @@ where
     }
 }
 
-#[inline]
 pub fn with_session_globals<R, F>(f: F) -> R
 where
     F: FnOnce(&SessionGlobals) -> R,
@@ -169,7 +164,6 @@ where
     SESSION_GLOBALS.with(f)
 }
 
-#[inline]
 pub fn create_default_session_globals_then<R>(f: impl FnOnce() -> R) -> R {
     create_session_globals_then(edition::DEFAULT_EDITION, f)
 }