@@ -119,7 +119,6 @@ impl SessionGlobals {
119119 }
120120}
121121
122- #[ inline]
123122pub fn create_session_globals_then < R > ( edition : Edition , f : impl FnOnce ( ) -> R ) -> R {
124123 assert ! (
125124 !SESSION_GLOBALS . is_set( ) ,
@@ -130,7 +129,6 @@ pub fn create_session_globals_then<R>(edition: Edition, f: impl FnOnce() -> R) -
130129 SESSION_GLOBALS . set ( & session_globals, f)
131130}
132131
133- #[ inline]
134132pub fn set_session_globals_then < R > ( session_globals : & SessionGlobals , f : impl FnOnce ( ) -> R ) -> R {
135133 assert ! (
136134 !SESSION_GLOBALS . is_set( ) ,
@@ -140,15 +138,13 @@ pub fn set_session_globals_then<R>(session_globals: &SessionGlobals, f: impl FnO
140138 SESSION_GLOBALS . set ( session_globals, f)
141139}
142140
143- #[ inline]
144141pub fn create_default_session_if_not_set_then < R , F > ( f : F ) -> R
145142where
146143 F : FnOnce ( & SessionGlobals ) -> R ,
147144{
148145 create_session_if_not_set_then ( edition:: DEFAULT_EDITION , f)
149146}
150147
151- #[ inline]
152148pub fn create_session_if_not_set_then < R , F > ( edition : Edition , f : F ) -> R
153149where
154150 F : FnOnce ( & SessionGlobals ) -> R ,
@@ -161,15 +157,13 @@ where
161157 }
162158}
163159
164- #[ inline]
165160pub fn with_session_globals < R , F > ( f : F ) -> R
166161where
167162 F : FnOnce ( & SessionGlobals ) -> R ,
168163{
169164 SESSION_GLOBALS . with ( f)
170165}
171166
172- #[ inline]
173167pub fn create_default_session_globals_then < R > ( f : impl FnOnce ( ) -> R ) -> R {
174168 create_session_globals_then ( edition:: DEFAULT_EDITION , f)
175169}
0 commit comments