Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICE: no successor #125846

Closed
matthiaskrgr opened this issue Jun 1, 2024 · 2 comments · Fixed by #125918
Closed

ICE: no successor #125846

matthiaskrgr opened this issue Jun 1, 2024 · 2 comments · Fixed by #125918
Labels
C-bug Category: This is a bug. F-inline_const_pat #![feature(inline_const_pat)] I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

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

@matthiaskrgr matthiaskrgr added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Jun 1, 2024
@rustbot rustbot added needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. F-inline_const_pat #![feature(inline_const_pat)] labels Jun 1, 2024
@matthiaskrgr
Copy link
Member Author

regression in #124650 cc @oli-obk ^^

@matthiaskrgr
Copy link
Member Author

smaller

#![feature(inline_const_pat)]

fn main() {
    match 0 {
        const {
            let a = 10_usize;
            *&a
        }
        | _ => {}
    }
}

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jun 3, 2024
…r-errors

Revert: create const block bodies in typeck via query feeding

as per the discussion in rust-lang#125806 (comment)

It was a mistake to try to shoehorn const blocks and some specific anon consts into the same box and feed them during typeck. It turned out not simplifying anything (my hope was that we could feed `type_of` to start avoiding the huge HIR matcher, but that didn't work out), but instead making a few things more fragile.

reverts the const-block-specific parts of rust-lang#124650

`@bors` rollup=never had a small perf impact previously

fixes rust-lang#125846

r? `@compiler-errors`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jun 3, 2024
…r-errors

Revert: create const block bodies in typeck via query feeding

as per the discussion in rust-lang#125806 (comment)

It was a mistake to try to shoehorn const blocks and some specific anon consts into the same box and feed them during typeck. It turned out not simplifying anything (my hope was that we could feed `type_of` to start avoiding the huge HIR matcher, but that didn't work out), but instead making a few things more fragile.

reverts the const-block-specific parts of rust-lang#124650

``@bors`` rollup=never had a small perf impact previously

fixes rust-lang#125846

r? ``@compiler-errors``
@jieyouxu jieyouxu added S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jun 4, 2024
fmease added a commit to fmease/rust that referenced this issue Jun 4, 2024
…r-errors

Revert: create const block bodies in typeck via query feeding

as per the discussion in rust-lang#125806 (comment)

It was a mistake to try to shoehorn const blocks and some specific anon consts into the same box and feed them during typeck. It turned out not simplifying anything (my hope was that we could feed `type_of` to start avoiding the huge HIR matcher, but that didn't work out), but instead making a few things more fragile.

reverts the const-block-specific parts of rust-lang#124650

```@bors``` rollup=never had a small perf impact previously

fixes rust-lang#125846

r? ```@compiler-errors```
bors added a commit to rust-lang-ci/rust that referenced this issue Jun 6, 2024
…errors

Revert: create const block bodies in typeck via query feeding

as per the discussion in rust-lang#125806 (comment)

It was a mistake to try to shoehorn const blocks and some specific anon consts into the same box and feed them during typeck. It turned out not simplifying anything (my hope was that we could feed `type_of` to start avoiding the huge HIR matcher, but that didn't work out), but instead making a few things more fragile.

reverts the const-block-specific parts of rust-lang#124650

`@bors` rollup=never had a small perf impact previously

fixes rust-lang#125846

r? `@compiler-errors`
@bors bors closed this as completed in 1be24d7 Jun 7, 2024
flip1995 pushed a commit to flip1995/rust-clippy that referenced this issue Jun 13, 2024
Revert: create const block bodies in typeck via query feeding

as per the discussion in rust-lang/rust#125806 (comment)

It was a mistake to try to shoehorn const blocks and some specific anon consts into the same box and feed them during typeck. It turned out not simplifying anything (my hope was that we could feed `type_of` to start avoiding the huge HIR matcher, but that didn't work out), but instead making a few things more fragile.

reverts the const-block-specific parts of rust-lang/rust#124650

`@bors` rollup=never had a small perf impact previously

fixes rust-lang/rust#125846

r? `@compiler-errors`
flip1995 pushed a commit to flip1995/rust-clippy that referenced this issue Jun 28, 2024
Revert: create const block bodies in typeck via query feeding

as per the discussion in rust-lang/rust#125806 (comment)

It was a mistake to try to shoehorn const blocks and some specific anon consts into the same box and feed them during typeck. It turned out not simplifying anything (my hope was that we could feed `type_of` to start avoiding the huge HIR matcher, but that didn't work out), but instead making a few things more fragile.

reverts the const-block-specific parts of rust-lang/rust#124650

`@bors` rollup=never had a small perf impact previously

fixes rust-lang/rust#125846

r? `@compiler-errors`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. F-inline_const_pat #![feature(inline_const_pat)] I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants