Responding to a feature request from the Rust community:
https://github.com/rust-lang/rust/issues/80630
void foo(X) { for (...) switch (X) case A X = B case B X = C }
Even though the initial switch value is non-constant, the switch statement can still be threaded:
the initial value will hit the switch statement but the rest of the state changes will proceed by
jumping unconditionally.
The early predictability check is relaxed to allow unpredictable values anywhere, but later,
after the paths through the switch statement have been enumerated, no non-constant state
values are allowed along the paths. Any state value not along a path will be an initial switch value,
which can be safely ignored.