-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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: trying to compare incompatible constructors Ref and Str(Ty("foo"))
#124083
Labels
A-patterns
Relating to patterns and pattern matching
C-bug
Category: This is a bug.
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.
Comments
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
Apr 17, 2024
rustbot
added
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Apr 17, 2024
cc @Nadrieril |
Minimized: struct Outest(&'a ());
fn make() -> Outest {}
fn main() {
if let Outest("foo") = make() {}
} This is a type error that should never have reached match checking. The ICE goes away if we replace |
If #122749 is indeed the culprit, I'm guessing there's a Ty::Error in there that used to be caught but isn't anymore |
Well it's not |
matthiaskrgr
added
the
S-bug-has-test
Status: This bug is tracked inside the repo by a `known-bug` test.
label
Apr 20, 2024
saethlin
added
A-patterns
Relating to patterns and pattern matching
and removed
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
labels
Apr 28, 2024
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Jul 4, 2024
Avoid follow-up errors and ICEs after missing lifetime errors on data structures Tuple struct constructors are functions, so when we call them typeck will use the signature tuple struct constructor function to provide type hints. Since typeck mostly ignores and erases lifetimes, we end up never seeing the error lifetime in writeback, thus not tainting the typeck result. Now, we eagerly taint typeck results by tainting from `resolve_vars_if_possible`, which is called all over the place. I did not carry over all the `crashes` test suite tests, as they are really all the same cause (missing or unknown lifetime names in tuple struct definitions or generic arg lists). fixes rust-lang#124262 fixes rust-lang#124083 fixes rust-lang#125155 fixes rust-lang#125888 fixes rust-lang#125992 fixes rust-lang#126666 fixes rust-lang#126648 fixes rust-lang#127268
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Jul 9, 2024
…ler-errors Avoid follow-up errors and ICEs after missing lifetime errors on data structures Tuple struct constructors are functions, so when we call them typeck will use the signature tuple struct constructor function to provide type hints. Since typeck mostly ignores and erases lifetimes, we end up never seeing the error lifetime in writeback, thus not tainting the typeck result. Now, we eagerly taint typeck results by tainting from `resolve_vars_if_possible`, which is called all over the place. I did not carry over all the `crashes` test suite tests, as they are really all the same cause (missing or unknown lifetime names in tuple struct definitions or generic arg lists). fixes rust-lang#124262 fixes rust-lang#124083 fixes rust-lang#125155 fixes rust-lang#125888 fixes rust-lang#125992 fixes rust-lang#126666 fixes rust-lang#126648 fixes rust-lang#127268
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-patterns
Relating to patterns and pattern matching
C-bug
Category: This is a bug.
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.
auto-reduced (treereduce-rust):
original:
Version information
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc
Program output
The text was updated successfully, but these errors were encountered: