rust/tests/ui/parser/attribute/attr-pat-struct-rest.stderr
Jack Rickard 3f09a20549
Do not allow attributes on struct field rest patterns
This removes support for attributes on struct field rest patterns (the `..`) from the parser.
Previously they were being parsed but dropped from the AST, so didn't work and were deleted by rustfmt.
2025-02-03 14:04:57 +00:00

11 lines
294 B
Plaintext

error: expected identifier, found `..`
--> $DIR/attr-pat-struct-rest.rs:6:27
|
LL | let S { #[cfg(any())] .. } = S {};
| - ^^ expected identifier
| |
| while parsing the fields for this pattern
error: aborting due to 1 previous error