You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Terse error message on tuple struct looking like regular struct #144595
error: expected one of `!`, `(`, `)`, `+`, `,`, `::`, or `<`, found `:`
--> src/lib.rs:4:13
|
4 | struct Foo(a: u8, b: u8)
| ^ expected one of 7 possible tokens
Desired output
error: expected one of `!`, `(`, `)`, `+`, `,`, `::`, or `<`, found `:`
--> src/lib.rs:4:13
|
4 | struct Foo(a: u8, b: u8);| ^ expected one of 7 possible tokens
help: if you wanted to create a tuple struct, remove field names:
--> src/lib.rs:4:13
|
4 ~ struct Foo(a: u8, b: u8);| --- ---
help: if you wanted to create a regular struct, use curly braces:
--> src/lib.rs:4:13
|
4 - struct Foo(a: u8, b: u8);
4 + struct Foo{a: u8, b: u8}
Rationale and extra context
Context: I was writing a quick reproducer, and made this silly grammatical mistake. But the error message completely threw me off
Activity
bb1yd commentedon Apr 9, 2026
I would like to try working on it. @rustbot claim
Rollup merge of rust-lang#156545 - bb1yd:issue-144595, r=mejrs
Rollup merge of rust-lang#156545 - bb1yd:issue-144595, r=mejrs
Rollup merge of rust-lang#156545 - bb1yd:issue-144595, r=mejrs
Rollup merge of rust-lang#156545 - bb1yd:issue-144595, r=mejrs
bb1yd commentedon May 29, 2026
I think this issue should now be closed?
ada4a commentedon May 29, 2026
Thank you for working on this, @bb1yd! Yes, looks like this can be closed:)
Btw, if you add
Fixes #144595to a PR description, then GitHub will automatically close the issue once the PR is merged. See here for more information