Make some parser structured suggestions verbose and tweak their wording#159667
Merged
rust-bors[bot] merged 2 commits intoJul 24, 2026
Conversation
Replace most of the `.span_suggestion(` in `rustc_parse` with `.span_suggestion_verbose(`, as they are more readabale, if more verbose. Verbose suggestions also tend to highlight off-by-one `Span` errors better.
Collaborator
|
The parser was modified, potentially altering the grammar of (stable) Rust cc @fmease |
Collaborator
|
r? @TaKO8Ki rustbot has assigned @TaKO8Ki. Use Why was this reviewer chosen?The reviewer was selected based on:
|
3 tasks
TaKO8Ki
approved these changes
Jul 23, 2026
Member
|
@bors r+ rollup |
Contributor
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Jul 23, 2026
…, r=TaKO8Ki Make some parser structured suggestions verbose and tweak their wording Replace most of the `.span_suggestion(` in `rustc_parse` with `.span_suggestion_verbose(`, as they are more readabale, if more verbose. Verbose suggestions also tend to highlight off-by-one `Span` errors better. Tweak some of the touched diagnostics to bring them more in-line with our house style. CC rust-lang#141973
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Jul 23, 2026
…, r=TaKO8Ki Make some parser structured suggestions verbose and tweak their wording Replace most of the `.span_suggestion(` in `rustc_parse` with `.span_suggestion_verbose(`, as they are more readabale, if more verbose. Verbose suggestions also tend to highlight off-by-one `Span` errors better. Tweak some of the touched diagnostics to bring them more in-line with our house style. CC rust-lang#141973
rust-bors Bot
pushed a commit
that referenced
this pull request
Jul 23, 2026
Rollup of 19 pull requests Successful merges: - #150161 (Remove 'static requirement on try_as_dyn) - #158362 (trait solver: account for universes from replace_bound_vars) - #159173 (Add allowed list check on EII implementations attributes) - #159466 (cmse: clear variant-dependent padding in `enum`s) - #159718 (Make `DocLinkResMap` an `FxIndexMap`) - #155795 (constify `vec![1, 2, 3]` macro) - #157776 (ci: Enable autodiff tests on x86_64 linux) - #157905 (Update comments and add tests for `-Zrandomize-layout` for some guaranteed ZSTs) - #158766 (Promote riscv64-unknown-linux-musl to tier 2 with host tools) - #159041 (Reorganize `tests/ui/issues` [22/N]) - #159108 (Reorganize `tests/ui/issues` [23/N]) - #159138 (doc: document wasm import symbol mangling) - #159531 (Reorganize `tests/ui/issues` [28/N]) - #159608 (early_otherwise: Don't hoist dereferences when the otherwise branch is reachable) - #159612 (Reorganize `tests/ui/issues` [29/N]) - #159653 (run `tests/assembly-llvm/asm/aarch64-types.rs` for `aarch64_be`) - #159667 (Make some parser structured suggestions verbose and tweak their wording) - #159759 (rustc-dev-guide subtree update) - #159761 (Remove outdated comment for resolve_vars_with_obligations)
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Jul 23, 2026
…, r=TaKO8Ki Make some parser structured suggestions verbose and tweak their wording Replace most of the `.span_suggestion(` in `rustc_parse` with `.span_suggestion_verbose(`, as they are more readabale, if more verbose. Verbose suggestions also tend to highlight off-by-one `Span` errors better. Tweak some of the touched diagnostics to bring them more in-line with our house style. CC rust-lang#141973
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Jul 23, 2026
…, r=TaKO8Ki Make some parser structured suggestions verbose and tweak their wording Replace most of the `.span_suggestion(` in `rustc_parse` with `.span_suggestion_verbose(`, as they are more readabale, if more verbose. Verbose suggestions also tend to highlight off-by-one `Span` errors better. Tweak some of the touched diagnostics to bring them more in-line with our house style. CC rust-lang#141973
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Jul 24, 2026
…, r=TaKO8Ki Make some parser structured suggestions verbose and tweak their wording Replace most of the `.span_suggestion(` in `rustc_parse` with `.span_suggestion_verbose(`, as they are more readabale, if more verbose. Verbose suggestions also tend to highlight off-by-one `Span` errors better. Tweak some of the touched diagnostics to bring them more in-line with our house style. CC rust-lang#141973
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Jul 24, 2026
…, r=TaKO8Ki Make some parser structured suggestions verbose and tweak their wording Replace most of the `.span_suggestion(` in `rustc_parse` with `.span_suggestion_verbose(`, as they are more readabale, if more verbose. Verbose suggestions also tend to highlight off-by-one `Span` errors better. Tweak some of the touched diagnostics to bring them more in-line with our house style. CC rust-lang#141973
rust-bors Bot
pushed a commit
that referenced
this pull request
Jul 24, 2026
Rollup of 12 pull requests Successful merges: - #159765 (Avoid spurious rebuilds of JSON docs in bootstrap) - #159781 (Update bootstrap to use -Zembed-metadata=no instead of -Zno-embed-metadata) - #158362 (trait solver: account for universes from replace_bound_vars) - #159173 (Add allowed list check on EII implementations attributes) - #159718 (Make `DocLinkResMap` an `FxIndexMap`) - #159722 ( [rustdoc] Retrieve `cfg_attr` information for derived impls for `doc_cfg` feature) - #155795 (constify `vec![1, 2, 3]` macro) - #157776 (ci: Enable autodiff tests on x86_64 linux) - #158766 (Promote riscv64-unknown-linux-musl to tier 2 with host tools) - #159271 (str: add ASCII fast path to word_to_titlecase) - #159666 (fix(ld64.lld): route version mismatch warnings to linker_info on macOS) - #159667 (Make some parser structured suggestions verbose and tweak their wording)
rust-bors Bot
pushed a commit
that referenced
this pull request
Jul 24, 2026
Rollup of 14 pull requests Successful merges: - #159765 (Avoid spurious rebuilds of JSON docs in bootstrap) - #159781 (Update bootstrap to use -Zembed-metadata=no instead of -Zno-embed-metadata) - #158362 (trait solver: account for universes from replace_bound_vars) - #158372 (rustfmt: Discover modules via `cfg_select!`) - #159173 (Add allowed list check on EII implementations attributes) - #159718 (Make `DocLinkResMap` an `FxIndexMap`) - #159722 ( [rustdoc] Retrieve `cfg_attr` information for derived impls for `doc_cfg` feature) - #159731 (std: Implement futex on wasip3 targets, update target spec) - #159755 (Improve consistency of attribute error messages) - #155795 (constify `vec![1, 2, 3]` macro) - #157776 (ci: Enable autodiff tests on x86_64 linux) - #158766 (Promote riscv64-unknown-linux-musl to tier 2 with host tools) - #159271 (str: add ASCII fast path to word_to_titlecase) - #159667 (Make some parser structured suggestions verbose and tweak their wording)
rust-timer
added a commit
that referenced
this pull request
Jul 24, 2026
Rollup merge of #159667 - estebank:verbose-parse-suggestions, r=TaKO8Ki Make some parser structured suggestions verbose and tweak their wording Replace most of the `.span_suggestion(` in `rustc_parse` with `.span_suggestion_verbose(`, as they are more readabale, if more verbose. Verbose suggestions also tend to highlight off-by-one `Span` errors better. Tweak some of the touched diagnostics to bring them more in-line with our house style. CC #141973
github-actions Bot
pushed a commit
to rust-lang/rustc-dev-guide
that referenced
this pull request
Jul 25, 2026
Rollup of 14 pull requests Successful merges: - rust-lang/rust#159765 (Avoid spurious rebuilds of JSON docs in bootstrap) - rust-lang/rust#159781 (Update bootstrap to use -Zembed-metadata=no instead of -Zno-embed-metadata) - rust-lang/rust#158362 (trait solver: account for universes from replace_bound_vars) - rust-lang/rust#158372 (rustfmt: Discover modules via `cfg_select!`) - rust-lang/rust#159173 (Add allowed list check on EII implementations attributes) - rust-lang/rust#159718 (Make `DocLinkResMap` an `FxIndexMap`) - rust-lang/rust#159722 ( [rustdoc] Retrieve `cfg_attr` information for derived impls for `doc_cfg` feature) - rust-lang/rust#159731 (std: Implement futex on wasip3 targets, update target spec) - rust-lang/rust#159755 (Improve consistency of attribute error messages) - rust-lang/rust#155795 (constify `vec![1, 2, 3]` macro) - rust-lang/rust#157776 (ci: Enable autodiff tests on x86_64 linux) - rust-lang/rust#158766 (Promote riscv64-unknown-linux-musl to tier 2 with host tools) - rust-lang/rust#159271 (str: add ASCII fast path to word_to_titlecase) - rust-lang/rust#159667 (Make some parser structured suggestions verbose and tweak their wording)
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace most of the
.span_suggestion(inrustc_parsewith.span_suggestion_verbose(, as they are more readabale, if more verbose. Verbose suggestions also tend to highlight off-by-oneSpanerrors better.Tweak some of the touched diagnostics to bring them more in-line with our house style.
CC #141973