Skip to content

Commit 1c08ced

Browse files
committed
Explain early abort legality
1 parent d3139b9 commit 1c08ced

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/librustc_mir/interpret/validity.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@ impl<'rt, 'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>>
522522
_ => false,
523523
}
524524
} => {
525+
// bailing out for zsts is ok, since the array element type can only be int/float
525526
if op.layout.is_zst() {
526527
return Ok(());
527528
}

0 commit comments

Comments
 (0)