mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-04 09:53:04 +03:00
Rollup merge of #94017 - fee1-dead:unub, r=bjorn3
Clarify confusing UB statement in MIR
This commit is contained in:
@@ -2270,11 +2270,13 @@ pub enum BinOp {
|
||||
Mul,
|
||||
/// The `/` operator (division)
|
||||
///
|
||||
/// Division by zero is UB.
|
||||
/// Division by zero is UB, because the compiler should have inserted checks
|
||||
/// prior to this.
|
||||
Div,
|
||||
/// The `%` operator (modulus)
|
||||
///
|
||||
/// Using zero as the modulus (second operand) is UB.
|
||||
/// Using zero as the modulus (second operand) is UB, because the compiler
|
||||
/// should have inserted checks prior to this.
|
||||
Rem,
|
||||
/// The `^` operator (bitwise xor)
|
||||
BitXor,
|
||||
|
||||
Reference in New Issue
Block a user