]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_middle/src/mir/syntax.rs
Rollup merge of #106805 - madsravn:master, r=compiler-errors
[rust.git] / compiler / rustc_middle / src / mir / syntax.rs
index 52c2b10cbbea97e286650d84ce8bf4a79be35a23..549bc65d6d79c7858a144fd038c107f1a07d85e5 100644 (file)
@@ -355,6 +355,12 @@ pub enum StatementKind<'tcx> {
     /// This avoids adding a new block and a terminator for simple intrinsics.
     Intrinsic(Box<NonDivergingIntrinsic<'tcx>>),
 
+    /// Instructs the const eval interpreter to increment a counter; this counter is used to track
+    /// how many steps the interpreter has taken. It is used to prevent the user from writing const
+    /// code that runs for too long or infinitely. Other than in the const eval interpreter, this
+    /// is a no-op.
+    ConstEvalCounter,
+
     /// No-op. Useful for deleting instructions without affecting statement indices.
     Nop,
 }