Files
rust/tests/ui/parser/field-name-in-tuple-struct.rs
T
2026-05-26 21:35:25 +08:00

7 lines
316 B
Rust

// Provide diagnostics when the user writes field names in tuple struct.(issue#144595)
struct Foo(a:u8,b:u8);
//~^ ERROR expected one of `!`, `(`, `)`, `+`, `,`, `::`, or `<`, found `:`
//~| HELP if you meant to write a path, use a double colon:
//~| HELP if you meant to create a regular struct, use curly braces: