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:
commit
cca43fe8e2
5 changed files with 26 additions and 4 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue