@@ -6,7 +6,7 @@ use log::trace;
6
6
use rustc_span:: { source_map:: DUMMY_SP , SpanData , Symbol } ;
7
7
use rustc_target:: abi:: { Align , Size } ;
8
8
9
- use crate :: borrow_tracker:: { stacked_borrows:: diagnostics:: TagHistory , AccessKind } ;
9
+ use crate :: borrow_tracker:: stacked_borrows:: diagnostics:: TagHistory ;
10
10
use crate :: * ;
11
11
12
12
/// Details of premature program termination.
@@ -67,9 +67,8 @@ pub enum NonHaltingDiagnostic {
67
67
///
68
68
/// new_kind is `None` for base tags.
69
69
CreatedPointerTag ( 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 ) ,
73
72
CreatedCallId ( CallId ) ,
74
73
CreatedAlloc ( AllocId , Size , Align , MemoryKind < MiriMemoryKind > ) ,
75
74
FreedAlloc ( AllocId ) ,
@@ -399,15 +398,7 @@ impl<'mir, 'tcx> MiriMachine<'mir, 'tcx> {
399
398
format ! (
400
399
"created tag {tag:?} for {kind} at {alloc_id:?}{range:?} derived from {orig_tag:?}"
401
400
) ,
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}" ) ,
411
402
CreatedCallId ( id) => format ! ( "function call with id {id}" ) ,
412
403
CreatedAlloc ( AllocId ( id) , size, align, kind) =>
413
404
format ! (
0 commit comments