@@ -24,11 +24,13 @@ use super::{
24
24
25
25
#[ derive( Debug , PartialEq , Copy , Clone ) ]
26
26
pub enum MemoryKind < T > {
27
- /// Error if deallocated except during a stack pop
27
+ /// Stack memory. Error if deallocated except during a stack pop.
28
28
Stack ,
29
- /// Error if ever deallocated
29
+ /// Memory backing vtables. Error if ever deallocated.
30
30
Vtable ,
31
- /// Additional memory kinds a machine wishes to distinguish from the builtin ones
31
+ /// Memory allocated by `caller_location` intrinsic. Error if ever deallocated.
32
+ CallerLocation ,
33
+ /// Additional memory kinds a machine wishes to distinguish from the builtin ones.
32
34
Machine ( T ) ,
33
35
}
34
36
@@ -38,6 +40,7 @@ impl<T: MayLeak> MayLeak for MemoryKind<T> {
38
40
match self {
39
41
MemoryKind :: Stack => false ,
40
42
MemoryKind :: Vtable => true ,
43
+ MemoryKind :: CallerLocation => true ,
41
44
MemoryKind :: Machine ( k) => k. may_leak ( )
42
45
}
43
46
}
@@ -719,6 +722,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'mir, 'tcx, M> {
719
722
let extra = match kind {
720
723
MemoryKind :: Stack => " (stack)" . to_owned ( ) ,
721
724
MemoryKind :: Vtable => " (vtable)" . to_owned ( ) ,
725
+ MemoryKind :: CallerLocation => " (caller_location)" . to_owned ( ) ,
722
726
MemoryKind :: Machine ( m) => format ! ( " ({:?})" , m) ,
723
727
} ;
724
728
self . dump_alloc_helper (
0 commit comments