Skip to content

Commit 12d1261

Browse files
nia-eRalfJung
andauthored
Apply suggestions from code review
Co-authored-by: Ralf Jung <post@ralfj.de>
1 parent 7b35b59 commit 12d1261

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

compiler/rustc_middle/src/mir/interpret/allocation.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -812,11 +812,10 @@ impl<Prov: Provenance, Extra, Bytes: AllocBytes> Allocation<Prov, Extra, Bytes>
812812
self.mark_foreign_write(full_range);
813813
}
814814

815-
/// Mark all bytes in the given range as initialised, setting provenances
815+
/// Mark all bytes in the given range as initialised and reset the provenance
816816
/// to wildcards. This entirely breaks the normal mechanisms for tracking
817817
/// initialisation and is only provided for Miri operating in native-lib
818-
/// mode. Only call this if you're certain the underlying bytes were in
819-
/// fact actually initialised!
818+
/// mode. UB will be missed if the underlying bytes were not actually initialized.
820819
pub fn mark_foreign_write(&mut self, range: AllocRange) {
821820
self.mark_init(range, true);
822821
self.provenance.write_wildcards(range);

0 commit comments

Comments
 (0)