Skip to content

ICE: broken mir with inline_const_pat #135306

Closed
@matthiaskrgr

Description

snippet:

//@compile-flags: -Zlint-mir
#![feature(inline_const_pat)]
struct a(i32);
fn main() {
    match a(5) {
        a(
            const {
                || match 0 {
                    b => 0,
                };
                4
            },
        ) => (),
        c => (),
    }
}

Version information

rustc 1.86.0-nightly (824759493 2025-01-09)
binary: rustc
commit-hash: 824759493246ee383beb9cd5ceffa0e15deb9fa4
commit-date: 2025-01-09
host: x86_64-unknown-linux-gnu
release: 1.86.0-nightly
LLVM version: 19.1.6

Command:
/home/matthias/.rustup/toolchains/master/bin/rustc -Zlint-mir

@rustbot label +F-inline_const_pat

Metadata

Labels

C-bugCategory: This is a bug.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.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions