Skip to content

fix issue-144595#155375

Closed
bb1yd wants to merge 1 commit into
rust-lang:mainfrom
bb1yd:issue-144595
Closed

fix issue-144595#155375
bb1yd wants to merge 1 commit into
rust-lang:mainfrom
bb1yd:issue-144595

Conversation

@bb1yd
Copy link
Copy Markdown
Contributor

@bb1yd bb1yd commented Apr 16, 2026

relevant issue:#144595
I implement this issue by simply find every colon in the tuple struct.

This method has a problem that it might mislead the user when the user type something likestruct Foo(std::string:String); (accidentally type :: as :). The compiler will print:

help: if you wanted to create a tuple struct, remove field names:
 --> test.rs:3:21
  |
3 |     struct Foo(std::string:String);
  |                     -------

I'm not sure if this is acceptable. Maybe a better way is to parse the field as a record struct field again.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 16, 2026
@rust-log-analyzer

This comment has been minimized.

@bb1yd

This comment was marked as outdated.

@bb1yd
Copy link
Copy Markdown
Contributor Author

bb1yd commented May 1, 2026

r? compiler

@bb1yd
Copy link
Copy Markdown
Contributor Author

bb1yd commented May 1, 2026

@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 May 1, 2026
@bb1yd

This comment was marked as outdated.

@bb1yd bb1yd marked this pull request as ready for review May 12, 2026 13:27
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 12, 2026

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

cc @fmease

@bb1yd
Copy link
Copy Markdown
Contributor Author

bb1yd commented May 13, 2026

too messy

new PR:#156545

@bb1yd bb1yd closed this May 13, 2026
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

4 participants