Skip to content

Commit 8759e5a

Browse files
committed
Update doc.
1 parent a601e76 commit 8759e5a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/rustc_mir_transform/src/promote_consts.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,8 @@ impl<'tcx> Validator<'_, 'tcx> {
360360
match operand {
361361
Operand::Copy(place) | Operand::Move(place) => self.validate_place(place.as_ref()),
362362

363-
// Promoting a runtime check would transform a runtime error into a compile-time error.
363+
// `RuntimeChecks` behaves different in const-eval and runtime MIR,
364+
// so we do not promote it.
364365
Operand::RuntimeChecks(_) => Err(Unpromotable),
365366

366367
// The qualifs for a constant (e.g. `HasMutInterior`) are checked in

0 commit comments

Comments
 (0)