Skip to content

ICE: no successor #125846

Closed
Closed

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

Activity

  1. added
    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.
    C-bugCategory: This is a bug.
    on Jun 1, 2024
  2. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Jun 1, 2024
  3. matthiaskrgr commented on Jun 1, 2024

    @matthiaskrgr
    MemberAuthor

    regression in #124650 cc @oli-obk ^^

  4. matthiaskrgr commented on Jun 1, 2024

    @matthiaskrgr
    MemberAuthor

    smaller

    #![feature(inline_const_pat)]
    
    fn main() {
        match 0 {
            const {
                let a = 10_usize;
                *&a
            }
            | _ => {}
        }
    }
  5. added 2 commits that reference this issue on Jun 3, 2024
  6. added
    S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issue
    and removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Jun 4, 2024
  7. added a commit that references this issue on Jun 4, 2024
  8. added 2 commits that reference this issue on Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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