Don't ICE if HIR and middle types disagree in borrowck error reporting#128172
Merged
bors merged 1 commit intorust-lang:masterfrom Jul 25, 2024
Merged
Don't ICE if HIR and middle types disagree in borrowck error reporting#128172bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
Collaborator
|
r? @chenyukang rustbot has assigned @chenyukang. Use |
Member
|
@bors r+ rollup |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jul 25, 2024
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#121364 (Implement lint against ambiguous negative literals) - rust-lang#127300 (Fix connect timeout for non-linux targets, read readiness of socket connection, Read readiness to detect errors. `Fixes rust-lang#127018`) - rust-lang#128138 (`#[naked]`: use an allowlist for allowed options on `asm!` in naked functions) - rust-lang#128158 (std: unsafe-wrap personality::gcc) - rust-lang#128171 (Make sure that args are compatible in `resolve_associated_item`) - rust-lang#128172 (Don't ICE if HIR and middle types disagree in borrowck error reporting) - rust-lang#128173 (Remove crashes for misuses of intrinsics) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jul 25, 2024
Rollup merge of rust-lang#128172 - compiler-errors:non-self-arg, r=chenyukang Don't ICE if HIR and middle types disagree in borrowck error reporting We try to match up the `middle::ty::Ty` and `hir::Ty` types in borrowck error reporting, but due to things like `Self` self type alias, or regular type aliases, these might not match up. Don't ICE. This PR also tries to recover the error by looking up the self type of the impl in case we see `Self`. The diagnostic is frankly quite confusing, but I also didn't really want to look at it because I don't understand the conflict error reporting logic. 🤷 Fixes rust-lang#121816
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We try to match up the
middle::ty::Tyandhir::Tytypes in borrowck error reporting, but due to things likeSelfself type alias, or regular type aliases, these might not match up. Don't ICE.This PR also tries to recover the error by looking up the self type of the impl in case we see
Self. The diagnostic is frankly quite confusing, but I also didn't really want to look at it because I don't understand the conflict error reporting logic. 🤷Fixes #121816