-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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 has escaping bound vars, so it cannot be wrapped in a dummy binder.
#134764
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
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
Regression in nightly-2024-12-06 |
reduced a bit and expanded the macro: #![feature(structural_match)]
impl<T: ?Sized> std::marker::StructuralPartialEq for O<T> { }
enum O<T: ?Sized> {
Some(*const T),
None,
}
const C: O<dyn for<'a> Fn(Box<dyn Fn(&'a u8)>)> = O::None;
fn main() {
match O::None {
C => (),
}
} |
estebank
added a commit
to estebank/rust
that referenced
this issue
Dec 26, 2024
…constant as pattern When we encounter a constant in a pattern, we check if it is non-structural. If so, we check if the type implements `PartialEq`, but for types with escaping bound vars the check would be incorrect as is, so we break early. This is ok because these types would be filtered anyways. Fix rust-lang#134764.
estebank
added a commit
to estebank/rust
that referenced
this issue
Jan 7, 2025
…constant as pattern When we encounter a constant in a pattern, we check if it is non-structural. If so, we check if the type implements `PartialEq`, but for types with escaping bound vars the check would be incorrect as is, so we break early. This is ok because these types would be filtered anyways. Fix rust-lang#134764.
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Jan 11, 2025
Avoid ICE: Account for `for<'a>` types when checking for non-structural type in constant as pattern When we encounter a constant in a pattern, we check if it is non-structural. If so, we check if the type implements `PartialEq`, but for types with escaping bound vars the check would be incorrect as is, so we break early. This is ok because these types would be filtered anyways. Slight tweak to output to remove unnecessary context as a drive-by. Fix rust-lang#134764.
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Jan 11, 2025
Rollup merge of rust-lang#134776 - estebank:vanilla-ice, r=lcnr Avoid ICE: Account for `for<'a>` types when checking for non-structural type in constant as pattern When we encounter a constant in a pattern, we check if it is non-structural. If so, we check if the type implements `PartialEq`, but for types with escaping bound vars the check would be incorrect as is, so we break early. This is ok because these types would be filtered anyways. Slight tweak to output to remove unnecessary context as a drive-by. Fix rust-lang#134764.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
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.
auto-reduced (treereduce-rust):
original:
Version information
Possibly related line of code:
rust/compiler/rustc_middle/src/ty/predicate.rs
Lines 527 to 539 in f432d5d
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc
Program output
The text was updated successfully, but these errors were encountered: