Skip to content

ICE: no successor #125846

Closed
Closed
@matthiaskrgr

Description

@matthiaskrgr

auto-reduced (treereduce-rust):

#![feature(inline_const_pat)]

fn foo() {
    match 0 {
        const {
            let a = 10_usize;
            let b: &'_ usize = &a;
            *b
        }
        | _ => {}
    }
}

fn main() {}

original:

#![feature(inline_const_pat)]
#![allow(dead_code)]
fn foo<const V: usize>() {
    match 0 {
        const {
        let a = 10_usize;
        let b: &'_ usize = &a;
        *b
    } | _ => {}
    }
}

fn main() {}

Version information

rustc 1.80.0-nightly (20be84a7e 2024-05-31)
binary: rustc
commit-hash: 20be84a7e62af0a623af4bfb75df6d30cb39d6d0
commit-date: 2024-05-31
host: x86_64-unknown-linux-gnu
release: 1.80.0-nightly
LLVM version: 18.1.6

Command:
/home/matthias/.rustup/toolchains/master/bin/rustc

Program output

warning: variable `a` is assigned to, but never used
 --> /tmp/icemaker_global_tempdir.buabiof6KLFK/rustc_testrunner_tmpdir_reporting.VVQJc66HsGka/mvce.rs:6:17
  |
6 |             let a = 10_usize;
  |                 ^
  |
  = note: consider using `_a` instead
  = note: `#[warn(unused_variables)]` on by default

warning: variable `b` is assigned to, but never used
 --> /tmp/icemaker_global_tempdir.buabiof6KLFK/rustc_testrunner_tmpdir_reporting.VVQJc66HsGka/mvce.rs:7:17
  |
7 |             let b: &'_ usize = &a;
  |                 ^
  |
  = note: consider using `_b` instead

warning: function `foo` is never used
 --> /tmp/icemaker_global_tempdir.buabiof6KLFK/rustc_testrunner_tmpdir_reporting.VVQJc66HsGka/mvce.rs:3:4
  |
3 | fn foo() {
  |    ^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: 3 warnings emitted

note: no errors encountered even though delayed bugs were created

note: those delayed bugs will now be shown as internal compiler errors

error: internal compiler error: no successor
  |
  = note: delayed at compiler/rustc_passes/src/liveness.rs:574:35 - disabled backtrace

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: please make sure that you have updated to the latest nightly

note: rustc 1.80.0-nightly (20be84a7e 2024-05-31) running on x86_64-unknown-linux-gnu

query stack during panic:
end of query stack

@rustbot label +F-inline_const_pat

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.F-inline_const_pat#![feature(inline_const_pat)]I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueT-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