diff --git a/src/mir/builder/control_flow/normalization/plan.rs b/src/mir/builder/control_flow/normalization/plan.rs index 96b0dadc..705f1c67 100644 --- a/src/mir/builder/control_flow/normalization/plan.rs +++ b/src/mir/builder/control_flow/normalization/plan.rs @@ -26,8 +26,21 @@ pub enum PlanKind { /// Phase 132-133: loop(true) + post assignments + return /// + /// **DEPRECATED in Phase 142 P0**: This variant is no longer created by PlanBox. + /// Normalization unit changed from "block suffix" to "statement (loop only)". + /// Post-loop assignments are now handled by normal MIR lowering, not normalization. + /// + /// Migration: Use `LoopOnly` instead. Process subsequent statements separately. + /// + /// This variant is kept for backward compatibility but will be removed + /// once all match arms and tests migrate to statement-level normalization. + /// /// Pattern: loop + N assignments + return /// Example: `loop(true) { x = 1; break }; x = x + 2; return x` + #[deprecated( + since = "Phase 142 P0", + note = "Use LoopOnly instead. Normalization unit is now statement-level." + )] LoopWithPost { /// Number of post-loop assignment statements post_assign_count: usize, @@ -45,6 +58,13 @@ impl NormalizationPlan { } /// Create a Phase 132-133 plan (loop + post assignments + return) + /// + /// **DEPRECATED in Phase 142 P0**: Use `loop_only()` instead. + /// Statement-level normalization makes this obsolete. + #[deprecated( + since = "Phase 142 P0", + note = "Use loop_only() instead. Statement-level normalization makes this obsolete." + )] pub fn loop_with_post(post_assign_count: usize) -> Self { // consumed = 1 (loop) + N (assigns) + 1 (return) let consumed = 1 + post_assign_count + 1;