-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Make parse error suggestions verbose and fix spans #127407
Conversation
why? Most of these seemed fine to me
For these It makes sense |
tests/ui/async-await/await-keyword/incorrect-syntax-suggestions.stderr
Outdated
Show resolved
Hide resolved
☔ The latest upstream changes (presumably #127419) made this pull request unmergeable. Please resolve the merge conflicts. |
44e85d3
to
e4df175
Compare
This comment has been minimized.
This comment has been minimized.
Go over all structured parser suggestions and make them verbose style. When suggesting to add or remove delimiters, turn them into multiple suggestion parts.
e4df175
to
b6f5188
Compare
As discussed in our 1:1, this needs a motivation and some links to annotate snippets discussions |
The initial impetus to start this work is to facilitate the migration to annotate-snippets, which doesn't yet support suggestions, but @Muscraft is working on. Sadly the conversations were 1:1, but the gist of them is:
The additional commits after the one you initially reviewed are addressing your review comments. |
@bors r+ |
…-obk Make parse error suggestions verbose and fix spans Go over all structured parser suggestions and make them verbose style. When suggesting to add or remove delimiters, turn them into multiple suggestion parts.
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#124921 (offset_from: always allow pointers to point to the same address) - rust-lang#127407 (Make parse error suggestions verbose and fix spans) - rust-lang#127675 (Remove invalid help diagnostics for const pointer) - rust-lang#127684 (consolidate miri-unleashed tests for mutable refs into one file) - rust-lang#127758 (coverage: Restrict `ExpressionUsed` simplification to `Code` mappings) r? `@ghost` `@rustbot` modify labels: rollup
…-obk Make parse error suggestions verbose and fix spans Go over all structured parser suggestions and make them verbose style. When suggesting to add or remove delimiters, turn them into multiple suggestion parts.
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#124921 (offset_from: always allow pointers to point to the same address) - rust-lang#127407 (Make parse error suggestions verbose and fix spans) - rust-lang#127684 (consolidate miri-unleashed tests for mutable refs into one file) - rust-lang#127729 (Stop using the `gen` identifier in the compiler) - rust-lang#127736 (Add myself to the review rotation) - rust-lang#127758 (coverage: Restrict `ExpressionUsed` simplification to `Code` mappings) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#127407 - estebank:parser-suggestions, r=oli-obk Make parse error suggestions verbose and fix spans Go over all structured parser suggestions and make them verbose style. When suggesting to add or remove delimiters, turn them into multiple suggestion parts.
help: escape the character | ||
| | ||
LL | '\r'; | ||
| ++ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm noticing that the renderer considers any whitespace as "not there" for the purposes of deciding whether this is a replacement or addition (this is normally done to have better output), but it has the side effect of rendering not quite correctly in the face of suggestions to replace zero-width whitespace characters.
Go over all structured parser suggestions and make them verbose style.
When suggesting to add or remove delimiters, turn them into multiple suggestion parts.