Skip to content
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

Fix overlapping spans in removing extra arguments #108239

Merged
merged 1 commit into from
Feb 22, 2023

Conversation

clubby789
Copy link
Contributor

Fixes #108225

Each span is already extended to include the previous comma, so extending to the next comma is unecessary and causes an ICE with assertions on.

@rustbot label +A-diagnostics

@rustbot
Copy link
Collaborator

rustbot commented Feb 19, 2023

r? @jackh726

(rustbot has picked a reviewer for you, use r? to override)

@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. A-diagnostics Area: Messages for errors, warnings, and lints labels Feb 19, 2023
@clubby789
Copy link
Contributor Author

I've added a new commit which merges contiguous Error::Extra into a single label/suggestion. I'm not sure if the resulting diagnostics are better as there's less noise, or worse as the individual types aren't reported.
This also fixes #108242

@rust-log-analyzer

This comment has been minimized.

@compiler-errors
Copy link
Member

I've added a new commit which merges contiguous Error::Extra into a single label/suggestion. I'm not sure if the resulting diagnostics are better as there's less noise, or worse as the individual types aren't reported.

Hm, I'm not sure if I have a strong opinion about it, though I think that change somewhat obscures the declared purpose of the PR in the title.

@clubby789
Copy link
Contributor Author

Given #108244 seems to fix this without regressing other stuff I'll just revert back to the first commit

@clubby789 clubby789 force-pushed the overlapping-spans branch 2 times, most recently from 45a313a to 3779c59 Compare February 20, 2023 18:36
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@compiler-errors
Copy link
Member

compiler-errors commented Feb 22, 2023

This code is kinda a mess (not your fault, pre-existing), but whatever. It could probably use some refactoring, but I won't let that block this PR landing.

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 22, 2023

📌 Commit 0b9a3e2 has been approved by compiler-errors

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 Feb 22, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 22, 2023
…piler-errors

Fix overlapping spans in removing extra arguments

Fixes rust-lang#108225

Each span is already extended to include the previous comma, so extending to the *next* comma is unecessary and causes an ICE with assertions on.

`@rustbot` label +A-diagnostics
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 22, 2023
…llaumeGomez

Rollup of 8 pull requests

Successful merges:

 - rust-lang#108110 (Move some `InferCtxt` methods to `EvalCtxt` in new solver)
 - rust-lang#108168 (Fix ICE on type alias in recursion)
 - rust-lang#108230 (Convert a hard-warning about named static lifetimes into lint "unused_lifetimes")
 - rust-lang#108239 (Fix overlapping spans in removing extra arguments)
 - rust-lang#108246 (Add an InstCombine for redundant casts)
 - rust-lang#108264 (no-fail-fast support for tool testsuites)
 - rust-lang#108310 (rustdoc: Fix duplicated attributes for first reexport)
 - rust-lang#108318 (Remove unused FileDesc::get_cloexec)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 437f210 into rust-lang:master Feb 22, 2023
@rustbot rustbot added this to the 1.69.0 milestone Feb 22, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 1, 2023
…, r=compiler-errors

Use span of semicolon for eager recovery in expression

Instead of the span of the token after the semicolon. This will hopefully cause fewer errors from overlapping spans.

fixes rust-lang#108242
based on rust-lang#108239
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 1, 2023
…, r=compiler-errors

Use span of semicolon for eager recovery in expression

Instead of the span of the token after the semicolon. This will hopefully cause fewer errors from overlapping spans.

fixes rust-lang#108242
based on rust-lang#108239
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 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE: (debug assertions) suggestion must not have overlapping part
7 participants