-
Notifications
You must be signed in to change notification settings - Fork 1k
Regression in 1.94.0 beta: Rustfmt produces broken code for const blocks in array lengths #6788
Copy link
Copy link
Closed
rust-lang/rust
#152234Labels
C-bugCategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICECategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICEI-invalid-codeIssue: formatting causes compile-pass code to compile-failIssue: formatting causes compile-pass code to compile-failP-highHigh priorityHigh priorityS-has-bisectionStatus: a bisection has been found for this issueStatus: a bisection has been found for this issueS-has-mcveStatus: a Minimal Complete and Verifiable Example has been found for this issueStatus: a Minimal Complete and Verifiable Example has been found for this issueregression-from-stable-to-betaRegression from stable to beta.Regression from stable to beta.
Metadata
Metadata
Assignees
Labels
C-bugCategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICECategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICEI-invalid-codeIssue: formatting causes compile-pass code to compile-failIssue: formatting causes compile-pass code to compile-failP-highHigh priorityHigh priorityS-has-bisectionStatus: a bisection has been found for this issueStatus: a bisection has been found for this issueS-has-mcveStatus: a Minimal Complete and Verifiable Example has been found for this issueStatus: a Minimal Complete and Verifiable Example has been found for this issueregression-from-stable-to-betaRegression from stable to beta.Regression from stable to beta.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Given the following code:
On version
1.94.0-beta.2 (2026-01-25 23a44d3c70448c08dc6a), rustfmt will format this code into the following code, which is broken:On version
1.93.0, however, rustfmt correctly formats the code as follows: