"move the `..` to the end of the field list",
vec![
(etc_span, "".into()),
- (self.span, ", .. }".into()),
+ (self.span, format!("{}.. }}", if ate_comma { "" } else { ", " })),
],
);
}
fn main() {
struct Foo { x: isize }
match (Foo { x: 10 }) {
- Foo { ref x: ref x } => {}, //~ ERROR expected `,`, found `:`
+ Foo { ref x: ref x } => {}, //~ ERROR expected `,`
_ => {}
}
}
| `..` must be at the end and cannot have a trailing comma
help: move the `..` to the end of the field list
|
-LL | let Point { y, , .. } = p; //~ ERROR expected `}`, found `,`
- | -- ^^^^^^
+LL | let Point { y, .. } = p; //~ ERROR expected `}`, found `,`
+ | -- ^^^^
error: expected `}`, found `,`
--> $DIR/issue-49257.rs:21:19