Skip to content

Commit 7e7b5d4

Browse files
RalfJungoli-obk
andauthored
Apply suggestions from code review
Co-Authored-By: Oliver Scherer <github35764891676564198441@oli-obk.de>
1 parent 4d65aa8 commit 7e7b5d4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/operator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ impl<'mir, 'tcx> EvalContextExt<'tcx> for super::MiriEvalContext<'mir, 'tcx> {
193193
// on read hardware this can easily happen. Thus for comparisons we require
194194
// both pointers to be live.
195195
if self.pointer_inbounds(left).is_ok() && self.pointer_inbounds(right).is_ok() {
196-
// Two in-bounds pointers in different allocatons are different.
196+
// Two in-bounds pointers in different allocations are different.
197197
false
198198
} else {
199199
return err!(InvalidPointerMath);

tests/compile-fail/zst3.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ fn main() {
77
// (that are out-of-bounds).
88
let mut x_box = Box::new(1u8);
99
let x = (&mut *x_box as *mut u8).wrapping_offset(1);
10-
// This one is just "at the egde", but still okay
10+
// This one is just "at the edge", but still okay
1111
unsafe { *(x as *mut [u8; 0]) = zst_val; }
1212
// One byte further is OOB.
1313
let x = x.wrapping_offset(1);

0 commit comments

Comments
 (0)