@@ -6,7 +6,7 @@ use log::trace;
66use  rustc_span:: { source_map:: DUMMY_SP ,  SpanData ,  Symbol } ; 
77use  rustc_target:: abi:: { Align ,  Size } ; 
88
9- use  crate :: stacked_borrows:: { diagnostics:: TagHistory ,   AccessKind } ; 
9+ use  crate :: stacked_borrows:: diagnostics:: TagHistory ; 
1010use  crate :: * ; 
1111
1212/// Details of premature program termination. 
@@ -67,9 +67,8 @@ pub enum NonHaltingDiagnostic {
6767/// 
6868/// new_kind is `None` for base tags. 
6969CreatedPointerTag ( NonZeroU64 ,  Option < String > ,  Option < ( AllocId ,  AllocRange ,  ProvenanceExtra ) > ) , 
70-     /// This `Item` was popped from the borrow stack, either due to an access with the given tag or 
71- /// a deallocation when the second argument is `None`. 
72- PoppedPointerTag ( Item ,  Option < ( ProvenanceExtra ,  AccessKind ) > ) , 
70+     /// This `Item` was popped from the borrow stack. The string explains the reason. 
71+ PoppedPointerTag ( Item ,  String ) , 
7372    CreatedCallId ( CallId ) , 
7473    CreatedAlloc ( AllocId ,  Size ,  Align ,  MemoryKind < MiriMemoryKind > ) , 
7574    FreedAlloc ( AllocId ) , 
@@ -399,15 +398,7 @@ impl<'mir, 'tcx> MiriMachine<'mir, 'tcx> {
399398                format ! ( 
400399                    "created tag {tag:?} for {kind} at {alloc_id:?}{range:?} derived from {orig_tag:?}" 
401400                ) , 
402-             PoppedPointerTag ( item,  tag)  =>
403-                 match  tag { 
404-                     None  => format ! ( "popped tracked tag for item {item:?} due to deallocation" , ) , 
405-                     Some ( ( tag,  access) )  => { 
406-                         format ! ( 
407-                             "popped tracked tag for item {item:?} due to {access:?} access for {tag:?}" , 
408-                         ) 
409-                     } 
410-                 } , 
401+             PoppedPointerTag ( item,  cause)  => format ! ( "popped tracked tag for item {item:?}{cause}" ) , 
411402            CreatedCallId ( id)  => format ! ( "function call with id {id}" ) , 
412403            CreatedAlloc ( AllocId ( id) ,  size,  align,  kind)  =>
413404                format ! ( 
0 commit comments