-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Show diff suggestion format on verbose replacement #127541
base: master
Are you sure you want to change the base?
Conversation
This is in response to #127407 (comment). This also highlights that there are multiple places where the suggestions could have more accurate spans. We should also improve the diff presentation to automatically skip pieces that haven't changed so that suggestions can continue to be built easily when possible. |
Does the verbose suggestion highlight (in color mode) the thing being replaced? What I mean is that before, the Adding a |
This comment was marked as resolved.
This comment was marked as resolved.
b00adfa
to
d470334
Compare
@oli-obk sorry about the last commit, it was an effort to simultaneously fix a papercut and have an SVG file to show different patch renderings, but even that backfired because GH can't render it :-/ I think it's failing because the contents are too long, I'll split it up and see. Can easily remove it. |
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
This comment has been minimized.
This comment has been minimized.
@Urgau https://github.com/rust-lang/rust/blob/82684d02db0b89766a46f1efeb7f9214f690cb3c/tests/ui/suggestions/incorrect-variant-literal.svg |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment was marked as resolved.
This comment was marked as resolved.
9548c77
to
729f12b
Compare
I'll move all the specific suggestion changes themselves to other PRs, but they will all clash with the diff output rendering change, so we'll have to be mindful of what lands first and then rebase properly. |
This comment has been minimized.
This comment has been minimized.
729f12b
to
68fce46
Compare
This comment was marked as resolved.
This comment was marked as resolved.
68fce46
to
9642d8c
Compare
This comment was marked as resolved.
This comment was marked as resolved.
9642d8c
to
a9dc677
Compare
a9dc677
to
75646df
Compare
This comment was marked as resolved.
This comment was marked as resolved.
75646df
to
4dfc054
Compare
This comment was marked as resolved.
This comment was marked as resolved.
4dfc054
to
b5f457f
Compare
r? compiler I'm going on leave for 4 months |
b5f457f
to
505e494
Compare
The visual diff in #127541 (comment) looks convincing to me. |
``` error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/attempted-access-non-fatal.rs:7:15 | LL | let _ = 2.l; | ^ | help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix | LL - let _ = 2.l; LL + let _ = 2.0f64; | ```
505e494
to
420364d
Compare
@bors r=petrochenkov rollup=never |
…enkov Show diff suggestion format on verbose replacement ``` error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/attempted-access-non-fatal.rs:7:15 | LL | let _ = 2.l; | ^ | help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix | LL - let _ = 2.l; LL + let _ = 2.0f64; | ``` before: ``` error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/attempted-access-non-fatal.rs:7:15 | LL | let _ = 2.l; | ^ | help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix | LL + let _ = 2.0f64; | ~~~~ ``` r? `@oli-obk`
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
☔ The latest upstream changes (presumably #129443) made this pull request unmergeable. Please resolve the merge conflicts. |
@bors r- (bors is doing strange things) |
before:
r? @oli-obk