@@ -60,7 +60,10 @@ impl MachineStopType for TerminationInfo {}
6060
6161/// Miri specific diagnostics
6262pub enum NonHaltingDiagnostic {
63- CreatedPointerTag ( NonZeroU64 , Option < ( AllocId , AllocRange ) > ) ,
63+ /// (new_tag, new_kind, (alloc_id, base_offset, orig_tag))
64+ ///
65+ /// new_kind is `None` for base tags.
66+ CreatedPointerTag ( NonZeroU64 , Option < String > , Option < ( AllocId , AllocRange , ProvenanceExtra ) > ) ,
6467 /// This `Item` was popped from the borrow stack, either due to an access with the given tag or
6568 /// a deallocation when the second argument is `None`.
6669 PoppedPointerTag ( Item , Option < ( ProvenanceExtra , AccessKind ) > ) ,
@@ -376,7 +379,7 @@ impl<'mir, 'tcx> MiriMachine<'mir, 'tcx> {
376379 MiriInterpCx :: generate_stacktrace_from_stack ( self . threads . active_thread_stack ( ) ) ;
377380 let ( stacktrace, _was_pruned) = prune_stacktrace ( stacktrace, self ) ;
378381
379- let ( title, diag_level) = match e {
382+ let ( title, diag_level) = match & e {
380383 RejectedIsolatedOp ( _) => ( "operation rejected by isolation" , DiagLevel :: Warning ) ,
381384 Int2Ptr { .. } => ( "integer-to-pointer cast" , DiagLevel :: Warning ) ,
382385 CreatedPointerTag ( ..)
@@ -388,10 +391,13 @@ impl<'mir, 'tcx> MiriMachine<'mir, 'tcx> {
388391 | WeakMemoryOutdatedLoad => ( "tracking was triggered" , DiagLevel :: Note ) ,
389392 } ;
390393
391- let msg = match e {
392- CreatedPointerTag ( tag, None ) => format ! ( "created tag {tag:?}" ) ,
393- CreatedPointerTag ( tag, Some ( ( alloc_id, range) ) ) =>
394- format ! ( "created tag {tag:?} at {alloc_id:?}{range:?}" ) ,
394+ let msg = match & e {
395+ CreatedPointerTag ( tag, None , _) => format ! ( "created base tag {tag:?}" ) ,
396+ CreatedPointerTag ( tag, Some ( kind) , None ) => format ! ( "created {tag:?} for {kind}" ) ,
397+ CreatedPointerTag ( tag, Some ( kind) , Some ( ( alloc_id, range, orig_tag) ) ) =>
398+ format ! (
399+ "created tag {tag:?} for {kind} at {alloc_id:?}{range:?} derived from {orig_tag:?}"
400+ ) ,
395401 PoppedPointerTag ( item, tag) =>
396402 match tag {
397403 None => format ! ( "popped tracked tag for item {item:?} due to deallocation" , ) ,
@@ -418,7 +424,7 @@ impl<'mir, 'tcx> MiriMachine<'mir, 'tcx> {
418424 format ! ( "weak memory emulation: outdated value returned from load" ) ,
419425 } ;
420426
421- let notes = match e {
427+ let notes = match & e {
422428 ProgressReport { block_count } => {
423429 // It is important that each progress report is slightly different, since
424430 // identical diagnostics are being deduplicated.
@@ -427,7 +433,7 @@ impl<'mir, 'tcx> MiriMachine<'mir, 'tcx> {
427433 _ => vec ! [ ] ,
428434 } ;
429435
430- let helps = match e {
436+ let helps = match & e {
431437 Int2Ptr { details : true } =>
432438 vec ! [
433439 (
0 commit comments