Print "(immutable)" when dumping allocations.

This commit is contained in:
Scott Olson 2016-09-19 04:10:51 -06:00
parent c679c71def
commit 678b9ca328

View File

@ -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.