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 suggestions rendering when the diff span is multiline #107671

Merged
merged 5 commits into from
Feb 7, 2023

Conversation

CastilloDel
Copy link
Contributor

@CastilloDel CastilloDel commented Feb 4, 2023

Fixes #92741

cc @estebank

I think, I finally fixed it. I still want to go back and try to clean up the code a bit. I'm open to suggestions.

Some examples of the new suggestions:

help: consider removing the borrow
  |
2 -     &
  |
help: consider removing the borrow
  |
2 -     &
3 -     mut
  |
help: consider removing the borrow
  |
2 -     &
3 -     mut if true { true } else { false }
2 +     if true { true } else { false }
  |

Should we add a test to ensure this behavior doesn't disappear in the future?

@rustbot
Copy link
Collaborator

rustbot commented Feb 4, 2023

r? @WaffleLapkin

(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. labels Feb 4, 2023
@CastilloDel
Copy link
Contributor Author

r? @estebank

I hope you don't mind. It seems simpler, because we already discussed this in the issue

@rustbot rustbot assigned estebank and unassigned WaffleLapkin Feb 4, 2023
@compiler-errors
Copy link
Member

Should we add a test to ensure this behavior doesn't disappear in the future?

Yes, in general, PRs that affect observable behavior should have a UI test associated with it.

@estebank
Copy link
Contributor

estebank commented Feb 5, 2023

After adding more comments (particularly for presentation code, I find that having comments showing what each bit of code visually results in helps me a lot when I try to make changes 6 months later, and I always regret it when I don't find comments) and having some tests for these, I believe we can merge.

@rustbot rustbot added the A-testsuite Area: The testsuite used to check the correctness of rustc label Feb 5, 2023
@CastilloDel
Copy link
Contributor Author

I think this PR is mostly finished now. Maybe the test should be in another directory? I couldn't find one that seemed right.

@CastilloDel CastilloDel marked this pull request as ready for review February 5, 2023 18:15
@estebank
Copy link
Contributor

estebank commented Feb 6, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Feb 6, 2023

📌 Commit 9cdc075 has been approved by estebank

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 6, 2023
@estebank
Copy link
Contributor

estebank commented Feb 6, 2023

There is some follow up work here that I'd like to see. I've approved the PR. If you have time before bors merges it, update it and I'll re-approve. If not, lets make a follow up PR.

@CastilloDel
Copy link
Contributor Author

Should be finished now. Thanks for all the help @estebank!

@WaffleLapkin
Copy link
Member

@bors r=estebank

@bors
Copy link
Contributor

bors commented Feb 7, 2023

📌 Commit f0830c0 has been approved by estebank

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Feb 7, 2023

⌛ Testing commit f0830c0 with merge 5dd0e1b...

@bors
Copy link
Contributor

bors commented Feb 7, 2023

☀️ Test successful - checks-actions
Approved by: estebank
Pushing 5dd0e1b to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 7, 2023
@bors bors merged commit 5dd0e1b into rust-lang:master Feb 7, 2023
@rustbot rustbot added this to the 1.69.0 milestone Feb 7, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5dd0e1b): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-3.5% [-5.3%, -1.4%] 8
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -3.5% [-5.3%, -1.4%] 8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. 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.

Newlines make diagnostic fix suggestions render strangely
7 participants