about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2023-02-11 16:38:42 +0000
committerCamille GILLOT <gillot.camille@gmail.com>2023-02-18 21:35:02 +0000
commit1480b1c524cad3a7ee0253496b7b026484e53371 (patch)
tree0705f3e3eba905d47b726d1408ecf8183d8e6819
parentd0cc00f7580d154aa8d9edd777a5aa7e6e6cfd22 (diff)
downloadrust-1480b1c524cad3a7ee0253496b7b026484e53371.tar.gz
rust-1480b1c524cad3a7ee0253496b7b026484e53371.zip
Correct comment.
-rw-r--r--compiler/rustc_middle/src/mir/syntax.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_middle/src/mir/syntax.rs b/compiler/rustc_middle/src/mir/syntax.rs
index 2e71fc19868..badf33293ad 100644
--- a/compiler/rustc_middle/src/mir/syntax.rs
+++ b/compiler/rustc_middle/src/mir/syntax.rs
@@ -672,8 +672,10 @@ pub enum TerminatorKind<'tcx> {
     /// necessarily executed even in the case of a panic, for example in `-C panic=abort`. If the
     /// assertion does not fail, execution continues at the specified basic block.
     ///
-    /// When overflow checking is disabled and we are generating run-time code, the `Overflow*`
-    /// variants of this terminator are codegened as simple `goto target`.
+    /// When overflow checking is disabled and this is run-time MIR (as opposed to compile-time MIR
+    /// that is used for CTFE), the following variants of this terminator behave as `goto target`:
+    /// - `OverflowNeg(..)`,
+    /// - `Overflow(op, ..)` if op is a checkable operation (add, sub, mul, shl, shr).
     Assert {
         cond: Operand<'tcx>,
         expected: bool,