We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5773e51 commit bda6d1fCopy full SHA for bda6d1f
compiler/rustc_data_structures/src/memmap.rs
@@ -40,4 +40,8 @@ impl Deref for Mmap {
40
}
41
42
43
+// SAFETY: On architectures other than WASM, mmap is used as backing storage. The address of this
44
+// memory map is stable. On WASM, `Vec<u8>` is used as backing storage. The `Mmap` type doesn't
45
+// export any function that can cause the `Vec` to be re-allocated. As such the address of the
46
+// bytes inside this `Vec` is stable.
47
unsafe impl StableAddress for Mmap {}
0 commit comments