Skip to content

Commit 5b8df34

Browse files
oli-obkRalfJung
andauthored
Update src/librustc_mir/interpret/place.rs
Co-Authored-By: Ralf Jung <[email protected]>
1 parent 056dff5 commit 5b8df34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/librustc_mir/interpret/place.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ where
532532
}
533533

534534
let index = if from_end {
535-
assert!(offset - 1 < min_length);
535+
assert!(0 < offset && offset - 1 < min_length);
536536
n - u64::from(offset)
537537
} else {
538538
assert!(offset < min_length);

0 commit comments

Comments
 (0)