rust/tests/ui/parser/attribute/attr-pat-struct-rest.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 lines
192 B
Rust
Raw Normal View History

// #81282: Attributes are not allowed on struct field rest patterns (the ..).
struct S {}
fn main() {
let S { #[cfg(any())] .. } = S {};
//~^ ERROR expected identifier, found `..`
}