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: Type system constant with non valtree'able type evaluated but no error emitted #133028

Closed
matthiaskrgr opened this issue Nov 14, 2024 · 1 comment
Labels
C-bug Category: This is a bug. F-associated_const_equality `#![feature(associated_const_equality)]` 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.

Comments

@matthiaskrgr
Copy link
Member

auto-reduced (treereduce-rust):

#![feature(associated_const_equality)]

trait Trait {
    const F: fn();
}

fn take(_: impl Trait<F = { || {} }>) {}

fn main() {}

original:

#![feature(associated_const_equality)]

trait Trait { const F: fn(); }

fn take(_: impl Trait<F = { || {} }>) {
    if let RCZ = &raw const *&0 { }
}

fn main() {}

Version information

rustc 1.84.0-nightly (22bcb81c6 2024-11-14)
binary: rustc
commit-hash: 22bcb81c6636f8ccc24478f92b30bf9266f116ef
commit-date: 2024-11-14
host: x86_64-unknown-linux-gnu
release: 1.84.0-nightly
LLVM version: 19.1.3

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

Program output

warning: trait `Trait` is never used
 --> /tmp/icemaker_global_tempdir.mt4XPzB9Nw7Z/rustc_testrunner_tmpdir_reporting.4x5gPz1Id0gX/mvce.rs:3:7
  |
3 | trait Trait {
  |       ^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: function `take` is never used
 --> /tmp/icemaker_global_tempdir.mt4XPzB9Nw7Z/rustc_testrunner_tmpdir_reporting.4x5gPz1Id0gX/mvce.rs:7:4
  |
7 | fn take(_: impl Trait<F = { || {} }>) {}
  |    ^^^^

warning: 2 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: Type system constant with non valtree'able type evaluated but no error emitted
  |
  = note: delayed at compiler/rustc_trait_selection/src/traits/mod.rs:613:39 - 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.84.0-nightly (22bcb81c6 2024-11-14) running on x86_64-unknown-linux-gnu

query stack during panic:
end of query stack

@rustbot label +F-associated_const_equality

@matthiaskrgr matthiaskrgr added C-bug Category: This is a bug. 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. labels Nov 14, 2024
@rustbot rustbot added needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. F-associated_const_equality `#![feature(associated_const_equality)]` labels Nov 14, 2024
@fmease
Copy link
Member

fmease commented Nov 14, 2024

Literally #119783

@fmease fmease closed this as not planned Won't fix, can't repro, duplicate, stale Nov 14, 2024
@fmease fmease removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Nov 14, 2024
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-associated_const_equality `#![feature(associated_const_equality)]` 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.
Projects
None yet
Development

No branches or pull requests

3 participants