-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 error when matching uninitialized constant with constant pattern in Rust #115599
Labels
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.
Comments
iamanonymouscs
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
Sep 6, 2023
rustbot
added
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Sep 6, 2023
@rustbot claim |
fmease
removed
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Sep 6, 2023
@rustbot claim |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Oct 11, 2023
use `PatKind::wild` when an ADT const value has violation Fixes rust-lang#115599 Since the [to_pat](https://github.com/rust-lang/rust/pull/111913/files#diff-6d8d99538aca600d633270051580c7a9e40b35824ea2863d9dda2c85a733b5d9R126-R155) behavior has been changed in the rust-lang#111913 update, the kind of `inlined_const_ast_pat` has transformed from `PatKind::Leaf { pattern: Pat { kind: Wild, ..} } ` to `PatKind::Constant`. This caused a scenario where there are no matched candidates, leading to a testing of the candidates. This process ultimately attempts to test the string const, triggering the `bug!` invocation finally. r? `@oli-obk`
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Oct 15, 2023
use `PatKind::Error` when an ADT const value has violation Fixes rust-lang#115599 Since the [to_pat](https://github.com/rust-lang/rust/pull/111913/files#diff-6d8d99538aca600d633270051580c7a9e40b35824ea2863d9dda2c85a733b5d9R126-R155) behavior has been changed in the rust-lang#111913 update, the kind of `inlined_const_ast_pat` has transformed from `PatKind::Leaf { pattern: Pat { kind: Wild, ..} } ` to `PatKind::Constant`. This caused a scenario where there are no matched candidates, leading to a testing of the candidates. This process ultimately attempts to test the string const, triggering the `bug!` invocation finally. r? `@oli-obk`
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Oct 15, 2023
Rollup merge of rust-lang#116522 - bvanjoi:fix-115599, r=oli-obk use `PatKind::Error` when an ADT const value has violation Fixes rust-lang#115599 Since the [to_pat](https://github.com/rust-lang/rust/pull/111913/files#diff-6d8d99538aca600d633270051580c7a9e40b35824ea2863d9dda2c85a733b5d9R126-R155) behavior has been changed in the rust-lang#111913 update, the kind of `inlined_const_ast_pat` has transformed from `PatKind::Leaf { pattern: Pat { kind: Wild, ..} } ` to `PatKind::Constant`. This caused a scenario where there are no matched candidates, leading to a testing of the candidates. This process ultimately attempts to test the string const, triggering the `bug!` invocation finally. r? ``@oli-obk``
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.
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.
Code
Meta
rustc --version --verbose
:This bug was also reproduced in the stable version(1.72)
Error output
Backtrace
The text was updated successfully, but these errors were encountered: