@@ -28,7 +28,7 @@ pub enum MemoryKind<T> {
28
28
/// Stack memory. Error if deallocated except during a stack pop.
29
29
Stack ,
30
30
/// Heap memory.
31
- Heap ,
31
+ ConstHeap ,
32
32
/// Memory backing vtables. Error if ever deallocated.
33
33
Vtable ,
34
34
/// Memory allocated by `caller_location` intrinsic. Error if ever deallocated.
@@ -42,7 +42,7 @@ impl<T: MayLeak> MayLeak for MemoryKind<T> {
42
42
fn may_leak ( self ) -> bool {
43
43
match self {
44
44
MemoryKind :: Stack => false ,
45
- MemoryKind :: Heap => false ,
45
+ MemoryKind :: ConstHeap => false ,
46
46
MemoryKind :: Vtable => true ,
47
47
MemoryKind :: CallerLocation => true ,
48
48
MemoryKind :: Machine ( k) => k. may_leak ( ) ,
@@ -54,7 +54,7 @@ impl<T: fmt::Display> fmt::Display for MemoryKind<T> {
54
54
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
55
55
match self {
56
56
MemoryKind :: Stack => write ! ( f, "stack variable" ) ,
57
- MemoryKind :: Heap => write ! ( f, "heap allocation" ) ,
57
+ MemoryKind :: ConstHeap => write ! ( f, "heap allocation" ) ,
58
58
MemoryKind :: Vtable => write ! ( f, "vtable" ) ,
59
59
MemoryKind :: CallerLocation => write ! ( f, "caller location" ) ,
60
60
MemoryKind :: Machine ( m) => write ! ( f, "{}" , m) ,
0 commit comments