Skip to content

additional changes for issue-144595#157235

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
bb1yd:improve-colon-suggestion
Jun 2, 2026
Merged

additional changes for issue-144595#157235
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
bb1yd:improve-colon-suggestion

Conversation

@bb1yd
Copy link
Copy Markdown
Contributor

@bb1yd bb1yd commented Jun 1, 2026

  • add spaces between the braces @ada4a
  • remove : in the help message.
    I learn this from estebank ("In the text we don't include a trailing :, unless we have a very specific reason. These messages can render in the terminal, in different ways, or in IDEs. Having a : can look out of place in some cases, specifically in rust-analyzer in VSCode is one of them.")
  • suggest to use :: for any colon encountered in tuple struct.
    So it now display help message for std::string:String. The same logic also appears in parse_block_tail, it suggest the user to use :: when parse_full_stmt stops at a colon. So I think it's okay to make this change.

r? mejrs

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Jun 1, 2026

The parser was modified, potentially altering the grammar of (stable) Rust
which would be a breaking change.

cc @fmease

@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 Jun 1, 2026
@bb1yd bb1yd force-pushed the improve-colon-suggestion branch from a1fffc7 to 6163b4c Compare June 1, 2026 07:15
@rust-log-analyzer

This comment has been minimized.

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 1, 2026

@bb1yd: 🔑 Insufficient privileges: not in try users

@bb1yd bb1yd force-pushed the improve-colon-suggestion branch from 6163b4c to f4ebc73 Compare June 1, 2026 07:45
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Jun 1, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

Copy link
Copy Markdown
Contributor

@mejrs mejrs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, that's a bit nicer now :) Looks good, but please drop the variable rename.

View changes since this review

Comment thread compiler/rustc_parse/src/parser/item.rs Outdated
@mejrs mejrs added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 2, 2026
@bb1yd bb1yd force-pushed the improve-colon-suggestion branch from f4ebc73 to 381cea9 Compare June 2, 2026 15:02
@bb1yd
Copy link
Copy Markdown
Contributor Author

bb1yd commented Jun 2, 2026

Reverted
@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 2, 2026
Copy link
Copy Markdown
Contributor

@mejrs mejrs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the improvement.

@bors r+ rollup

View changes since this review

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 2, 2026

📌 Commit 381cea9 has been approved by mejrs

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 5. This pull request will be tested once the tree is reopened.

@rust-bors rust-bors Bot 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 Jun 2, 2026
@ada4a
Copy link
Copy Markdown
Contributor

ada4a commented Jun 2, 2026

Thank you again for picking this up @bb1yd <3

JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 2, 2026
…mejrs

additional changes for issue-144595

- add spaces between the braces @ada4a
- remove `:` in the help message.
I learn this from estebank ("In the text we don't include a trailing :, unless we have a very specific reason. These messages can render in the terminal, in different ways, or in IDEs. Having a : can look out of place in some cases, specifically in rust-analyzer in VSCode is one of them.")
- suggest to use `::` for any colon encountered in tuple struct.
  So it now display help message for `std::string:String`. The same logic also appears in `parse_block_tail`, it suggest the user to use `::` when `parse_full_stmt` stops at a colon. So I think it's okay to make this change.

r? mejrs
rust-bors Bot pushed a commit that referenced this pull request Jun 2, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - #157035 (`LivenessValues`: use dedicated enum rather than mutually exclusive `Option`s)
 - #157182 (Restore simpler Encode/Decode impls for u32 and (on 64bit systems) usize)
 - #157310 (rustdoc: Render `impl` restriction)
 - #157070 (Remove `skip_arg` attribute from `Diagnostic` and `Subdiagnostic` proc-macros)
 - #157137 (rustc_target: Use +spe for powerpcspe targets)
 - #157215 (Implement argument-dependent target checking for the `#[repr]` parser)
 - #157235 (additional changes for issue-144595)
 - #157321 (Remove unnecessary arm in `handle_res`)
 - #157324 (Add test for undefined EII static error)
rust-bors Bot pushed a commit that referenced this pull request Jun 2, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - #157035 (`LivenessValues`: use dedicated enum rather than mutually exclusive `Option`s)
 - #157182 (Restore simpler Encode/Decode impls for u32 and (on 64bit systems) usize)
 - #157310 (rustdoc: Render `impl` restriction)
 - #157070 (Remove `skip_arg` attribute from `Diagnostic` and `Subdiagnostic` proc-macros)
 - #157137 (rustc_target: Use +spe for powerpcspe targets)
 - #157215 (Implement argument-dependent target checking for the `#[repr]` parser)
 - #157235 (additional changes for issue-144595)
 - #157321 (Remove unnecessary arm in `handle_res`)
 - #157324 (Add test for undefined EII static error)
rust-bors Bot pushed a commit that referenced this pull request Jun 2, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - #157035 (`LivenessValues`: use dedicated enum rather than mutually exclusive `Option`s)
 - #157182 (Restore simpler Encode/Decode impls for u32 and (on 64bit systems) usize)
 - #157310 (rustdoc: Render `impl` restriction)
 - #157070 (Remove `skip_arg` attribute from `Diagnostic` and `Subdiagnostic` proc-macros)
 - #157137 (rustc_target: Use +spe for powerpcspe targets)
 - #157215 (Implement argument-dependent target checking for the `#[repr]` parser)
 - #157235 (additional changes for issue-144595)
 - #157321 (Remove unnecessary arm in `handle_res`)
 - #157324 (Add test for undefined EII static error)
@rust-bors rust-bors Bot merged commit 1aabc75 into rust-lang:main Jun 2, 2026
12 checks passed
@rustbot rustbot added this to the 1.98.0 milestone Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

5 participants