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: errors selecting obligation during MIR typeck: [TrueError] #129425

Open
matthiaskrgr opened this issue Aug 22, 2024 · 1 comment
Open

ICE: errors selecting obligation during MIR typeck: [TrueError] #129425

matthiaskrgr opened this issue Aug 22, 2024 · 1 comment
Labels
C-bug Category: This is a bug. F-generic_const_exprs `#![feature(generic_const_exprs)]` I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-types Relevant to the types team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

snippet:

#![feature(generic_const_exprs)]
fn foo<'a, T: 'a>(_: [(); std::mem::offset_of!((T,), 0)]) {}

Version information

rustc 1.82.0-nightly (5ad98b402 2024-08-22)
binary: rustc
commit-hash: 5ad98b4026d5172f27615b105658bc8bfd677be8
commit-date: 2024-08-22
host: x86_64-unknown-linux-gnu
release: 1.82.0-nightly
LLVM version: 19.1.0

Command:
/home/matthias/.rustup/toolchains/master/bin/rustc --crate-type=lib

Program output

warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /tmp/icemaker_global_tempdir.tDpCHeI4R4t9/rustc_testrunner_tmpdir_reporting.Lo4fDYzUFauY/mvce.rs:1:12
  |
1 | #![feature(generic_const_exprs)]
  |            ^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
  = note: `#[warn(incomplete_features)]` on by default

warning: function `foo` is never used
 --> /tmp/icemaker_global_tempdir.tDpCHeI4R4t9/rustc_testrunner_tmpdir_reporting.Lo4fDYzUFauY/mvce.rs:2:4
  |
2 | fn foo<'a, T: 'a>(_: [(); std::mem::offset_of!((T,), 0)]) {}
  |    ^^^
  |
  = note: `#[warn(dead_code)]` on by default

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: Missing value for constant, but no error reported?
 --> /tmp/icemaker_global_tempdir.tDpCHeI4R4t9/rustc_testrunner_tmpdir_reporting.Lo4fDYzUFauY/mvce.rs:2:27
  |
2 | fn foo<'a, T: 'a>(_: [(); std::mem::offset_of!((T,), 0)]) {}
  |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
note: delayed at compiler/rustc_trait_selection/src/traits/const_evaluatable.rs:74:68 - disabled backtrace
 --> /tmp/icemaker_global_tempdir.tDpCHeI4R4t9/rustc_testrunner_tmpdir_reporting.Lo4fDYzUFauY/mvce.rs:2:27
  |
2 | fn foo<'a, T: 'a>(_: [(); std::mem::offset_of!((T,), 0)]) {}
  |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  = note: this error: internal compiler error originates in the macro `std::mem::offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)

error: internal compiler error: errors selecting obligation during MIR typeck: [TrueError]
  |
  = note: delayed at /rustc/5ad98b4026d5172f27615b105658bc8bfd677be8/compiler/rustc_trait_selection/src/traits/query/type_op/custom.rs:94:18 - 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.82.0-nightly (5ad98b402 2024-08-22) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -Z dump-mir-dir=dir

query stack during panic:
end of query stack

@rustbot label +F-generic_const_exprs

@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 Aug 22, 2024
@rustbot rustbot added needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. F-generic_const_exprs `#![feature(generic_const_exprs)]` labels Aug 22, 2024
@matthiaskrgr
Copy link
Member Author

nightly-2024-01-21
maybe #119821 ?

@saethlin saethlin added T-types Relevant to the types team, which will review and decide on the PR/issue. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Aug 23, 2024
@matthiaskrgr matthiaskrgr added the S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. label Sep 1, 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-generic_const_exprs `#![feature(generic_const_exprs)]` I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-types Relevant to the types team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants