Do not ICE with incorrect empty suggestion by estebank · Pull Request #127988 · rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation8 Commits2 Checks6 Files changed

Conversation

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

[ Show hidden characters]({{ revealButtonHref }})

estebank

When we have two types with the same name, one without type parameters and the other with type parameters and a derive macro, we were before incorrectly suggesting to remove type parameters from the former, which ICEd because we were suggesting to remove nothing. We now gate against this.

The output is still not perfect. E0107 should explicitly detect this case and provide better context, but for now let's avoid the ICE.

Fix #108748.

@rustbot

r? @fmease

rustbot has assigned @fmease.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.

labels

Jul 19, 2024

@matthiaskrgr

This comment was marked as resolved.

compiler-errors

@rust-log-analyzer

This comment has been minimized.

@fmease

Was #109082 closed due to perf regressions?

@estebank

@fmease yes. Couldn't figure out how to mitigate them.

@estebank @fmease

When we have two types with the same name, one without type parameters and the other with type parameters and a derive macro, we were before incorrectly suggesting to remove type parameters from the former, which ICEd because we were suggesting to remove nothing. We now gate against this.

The output is still not perfect. E0107 should explicitly detect this case and provide better context, but for now let's avoid the ICE.

@fmease fmease added the rla-silenced

Silences rust-log-analyzer postings to the PR it's added on.

label

Sep 18, 2024

@fmease

@fmease fmease removed the rla-silenced

Silences rust-log-analyzer postings to the PR it's added on.

label

Sep 18, 2024

@fmease

I've pushed an extra commit that makes it clear that this is a HACK.

@bors r+ rollup (diagnostic code path)

@bors

📌 Commit 682c5f4 has been approved by fmease

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

Sep 18, 2024

workingjubilee added a commit to workingjubilee/rustc that referenced this pull request

Sep 18, 2024

@workingjubilee

Do not ICE with incorrect empty suggestion

When we have two types with the same name, one without type parameters and the other with type parameters and a derive macro, we were before incorrectly suggesting to remove type parameters from the former, which ICEd because we were suggesting to remove nothing. We now gate against this.

The output is still not perfect. E0107 should explicitly detect this case and provide better context, but for now let's avoid the ICE.

Fix rust-lang#108748.

This was referenced

Sep 18, 2024

bors added a commit to rust-lang-ci/rust that referenced this pull request

Sep 18, 2024

@bors

…kingjubilee

Rollup of 9 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Sep 19, 2024

@rust-timer

Rollup merge of rust-lang#127988 - estebank:dupe-derive-params, r=fmease

Do not ICE with incorrect empty suggestion

When we have two types with the same name, one without type parameters and the other with type parameters and a derive macro, we were before incorrectly suggesting to remove type parameters from the former, which ICEd because we were suggesting to remove nothing. We now gate against this.

The output is still not perfect. E0107 should explicitly detect this case and provide better context, but for now let's avoid the ICE.

Fix rust-lang#108748.

Labels

A-diagnostics

Area: Messages for errors, warnings, and lints

S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.