From 678b9ca3285f08dd1ffb24cea0f2ec023023ffad Mon Sep 17 00:00:00 2001 From: Scott Olson Date: Mon, 19 Sep 2016 04:10:51 -0600 Subject: [PATCH] Print "(immutable)" when dumping allocations. --- src/memory.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/memory.rs b/src/memory.rs index ede76b4728e..6042181cdf2 100644 --- a/src/memory.rs +++ b/src/memory.rs @@ -382,7 +382,9 @@ impl<'a, 'tcx> Memory<'a, 'tcx> { print!("__ "); } } - println!("({} bytes)", alloc.bytes.len()); + + let immutable = if alloc.immutable { " (immutable)" } else { "" }; + println!("({} bytes){}", alloc.bytes.len(), immutable); if !relocations.is_empty() { print!("{:1$}", "", prefix.len()); // Print spaces.