mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-30 03:57:37 +00:00

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.
9 lines
192 B
Rust
9 lines
192 B
Rust
// #81282: Attributes are not allowed on struct field rest patterns (the ..).
|
|
|
|
struct S {}
|
|
|
|
fn main() {
|
|
let S { #[cfg(any())] .. } = S {};
|
|
//~^ ERROR expected identifier, found `..`
|
|
}
|