Skip to content

Commit a844529

Browse files
authored
Rollup merge of rust-lang#144169 - RalfJung:type-id-fix, r=oli-obk
interpret: fix TypeId pointers being considered data pointers Fixes rust-lang/miri#4477 r? ````@oli-obk````
2 parents 8f64817 + 4a74c33 commit a844529

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/any.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ impl TypeId {
783783

784784
// This is a provenance-stripping memcpy.
785785
for (i, chunk) in self.data.iter().copied().enumerate() {
786-
let chunk = chunk.expose_provenance().to_ne_bytes();
786+
let chunk = chunk.addr().to_ne_bytes();
787787
let start = i * chunk.len();
788788
bytes[start..(start + chunk.len())].copy_from_slice(&chunk);
789789
}

0 commit comments

Comments
 (0)