Skip to content

Commit 786aeb2

Browse files
committed
also print 'immutable' flag
1 parent 3ef5c8a commit 786aeb2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/machine.rs

+11
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,17 @@ impl interpret::Provenance for Provenance {
260260
}
261261
}
262262

263+
fn fmt(ptr: &Pointer<Self>, f: &mut fmt::Formatter<'_>) -> fmt::Result {
264+
let (prov, addr) = ptr.into_parts(); // address is absolute
265+
write!(f, "{:#x}", addr.bytes())?;
266+
if f.alternate() {
267+
write!(f, "{prov:#?}")?;
268+
} else {
269+
write!(f, "{prov:?}")?;
270+
}
271+
Ok(())
272+
}
273+
263274
fn join(left: Option<Self>, right: Option<Self>) -> Option<Self> {
264275
match (left, right) {
265276
// If both are the *same* concrete tag, that is the result.

0 commit comments

Comments
 (0)