E3033

E3033 — A comptime block the evaluator could not finish. The block runs during compilation and leaves nothing behind, so one that cannot be run has no meaning — and used to be emitted as ordinary run-time code, which hid the fact entirely.

What the compiler reports

Error[E3033]{{.*}}writes to 'for_outer'

The fragments the test suite holds the compiler to. An ellipsis marks text the test does not constrain; the emitted message also carries a source location.

A program that triggers it

//
// Part of the Vx Project, under the Apache License v2.0 with LLVM Exceptions.
// See LICENSE for the Apache License 2.0 with LLVM Exceptions.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//

fn main() -> i32 {
  let mut for_outer : i32 = 0i32;
  let value = comptime {
    for i in 0i32..2i32 {
      for_outer = i;
    }
    7i32
  };
  return value;
}

From tests/frontend/fail/comptime_bounded_for_outer_write.vx, which asserts this diagnostic on every commit.

Related