Closed
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).