-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
Description
Following (wrong) code gives an error on beta 1.19 and stable 1.18, but ICEs on current nightly:
fn main() {
let mut y;
macro_rules! m {
($a:expr) => {
let $a = 0;
}
}
m!(y);
}
The error (expected behaviour):
error: expected pattern, found `y`
The ICE message (new behaviour):
internal compiler error: /checkout/src/librustc_const_eval/pattern.rs:282: encountered errors lowering pattern: [ConstEval(ConstEvalErr { span: src/main.rs:8:5: 8:6, kind: NonConstPath })]
Nightly (soon beta) regression. Bisected using rust-bisect to #42964 (7acce37).
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.