@@ -81,7 +81,7 @@ impl VisitTags for FrameExtra {
8181/// Extra global state, available to the memory access hooks.
8282#[ derive( Debug ) ]
8383pub struct GlobalStateInner {
84- /// Borrow tracker method currently in use (except BorrowTrackerMethod::Off)
84+ /// Borrow tracker method currently in use.
8585 pub borrow_tracker_method : BorrowTrackerMethod ,
8686 /// Next unused pointer ID (tag).
8787 pub next_ptr_tag : BorTag ,
@@ -183,11 +183,6 @@ impl GlobalStateInner {
183183 }
184184 }
185185
186- /// Return the borrow tracker method
187- pub fn method ( & self ) -> BorrowTrackerMethod {
188- self . borrow_tracker_method
189- }
190-
191186 /// Generates a new pointer tag. Remember to also check track_pointer_tags and log its creation!
192187 pub fn new_ptr ( & mut self ) -> BorTag {
193188 let id = self . next_ptr_tag ;
@@ -272,23 +267,23 @@ impl<'mir, 'tcx: 'mir> EvalContextExt<'mir, 'tcx> for crate::MiriInterpCx<'mir,
272267pub trait EvalContextExt < ' mir , ' tcx : ' mir > : crate :: MiriInterpCxExt < ' mir , ' tcx > {
273268 fn retag ( & mut self , kind : RetagKind , place : & PlaceTy < ' tcx , Provenance > ) -> InterpResult < ' tcx > {
274269 let this = self . eval_context_mut ( ) ;
275- let method = this. machine . borrow_tracker . as_ref ( ) . unwrap ( ) . borrow ( ) . method ( ) ;
270+ let method = this. machine . borrow_tracker . as_ref ( ) . unwrap ( ) . borrow ( ) . borrow_tracker_method ;
276271 match method {
277272 BorrowTrackerMethod :: StackedBorrows => this. sb_retag ( kind, place) ,
278273 }
279274 }
280275
281276 fn retag_return_place ( & mut self ) -> InterpResult < ' tcx > {
282277 let this = self . eval_context_mut ( ) ;
283- let method = this. machine . borrow_tracker . as_ref ( ) . unwrap ( ) . borrow ( ) . method ( ) ;
278+ let method = this. machine . borrow_tracker . as_ref ( ) . unwrap ( ) . borrow ( ) . borrow_tracker_method ;
284279 match method {
285280 BorrowTrackerMethod :: StackedBorrows => this. sb_retag_return_place ( ) ,
286281 }
287282 }
288283
289284 fn expose_tag ( & mut self , alloc_id : AllocId , tag : BorTag ) -> InterpResult < ' tcx > {
290285 let this = self . eval_context_mut ( ) ;
291- let method = this. machine . borrow_tracker . as_ref ( ) . unwrap ( ) . borrow ( ) . method ( ) ;
286+ let method = this. machine . borrow_tracker . as_ref ( ) . unwrap ( ) . borrow ( ) . borrow_tracker_method ;
292287 match method {
293288 BorrowTrackerMethod :: StackedBorrows => this. sb_expose_tag ( alloc_id, tag) ,
294289 }
0 commit comments