File tree 1 file changed +0
-20
lines changed
compiler/rustc_data_structures/src
1 file changed +0
-20
lines changed Original file line number Diff line number Diff line change @@ -203,12 +203,6 @@ impl<T> RwLock<T> {
203
203
}
204
204
}
205
205
206
- #[ inline( always) ]
207
- #[ track_caller]
208
- pub fn with_read_lock < F : FnOnce ( & T ) -> R , R > ( & self , f : F ) -> R {
209
- f ( & * self . read ( ) )
210
- }
211
-
212
206
#[ inline( always) ]
213
207
pub fn try_write ( & self ) -> Result < WriteGuard < ' _ , T > , ( ) > {
214
208
self . 0 . try_write ( ) . ok_or ( ( ) )
@@ -223,12 +217,6 @@ impl<T> RwLock<T> {
223
217
}
224
218
}
225
219
226
- #[ inline( always) ]
227
- #[ track_caller]
228
- pub fn with_write_lock < F : FnOnce ( & mut T ) -> R , R > ( & self , f : F ) -> R {
229
- f ( & mut * self . write ( ) )
230
- }
231
-
232
220
#[ inline( always) ]
233
221
#[ track_caller]
234
222
pub fn borrow ( & self ) -> ReadGuard < ' _ , T > {
@@ -240,14 +228,6 @@ impl<T> RwLock<T> {
240
228
pub fn borrow_mut ( & self ) -> WriteGuard < ' _ , T > {
241
229
self . write ( )
242
230
}
243
-
244
- #[ inline( always) ]
245
- pub fn leak ( & self ) -> & T {
246
- let guard = self . read ( ) ;
247
- let ret = unsafe { & * ( & raw const * guard) } ;
248
- std:: mem:: forget ( guard) ;
249
- ret
250
- }
251
231
}
252
232
253
233
// FIXME: Probably a bad idea
You can’t perform that action at this time.
0 commit comments