Rollup merge of #98888 - RalfJung:interpret-checked-bin, r=oli-obk
interpret: fix CheckedBinOp behavior when overflow checking is disabled Adjusts the interpreter to https://github.com/rust-lang/rust/pull/98738. r? `@oli-obk`
This commit is contained in:
@@ -993,8 +993,9 @@ pub enum Rvalue<'tcx> {
|
||||
|
||||
/// Same as `BinaryOp`, but yields `(T, bool)` with a `bool` indicating an error condition.
|
||||
///
|
||||
/// When overflow checking is disabled, the error condition is false. Otherwise, the error
|
||||
/// condition is determined as described below.
|
||||
/// When overflow checking is disabled and we are generating run-time code, the error condition
|
||||
/// is false. Otherwise, and always during CTFE, the error condition is determined as described
|
||||
/// below.
|
||||
///
|
||||
/// For addition, subtraction, and multiplication on integers the error condition is set when
|
||||
/// the infinite precision result would be unequal to the actual result.
|
||||
|
||||
Reference in New Issue
Block a user