Skip to content

ICE with macro_rules! in block #39709

Closed
Closed
@jorendorff

Description

@jorendorff
fn main() {
    println!("", { macro_rules! x { ($()*) => {} } 33 });
}

(There are a few open ICEs around macro_rules!, including one very recently fixed, but they look different.)

thread 'rustc' panicked at 'index out of bounds: the len is 0 but the index is 0', /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libcollections/vec.rs:1392

Metadata

Metadata

Assignees

Labels

A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant 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.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions