Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/parser/src/grammar/expressions.rs')
-rw-r--r--crates/parser/src/grammar/expressions.rs18
1 files changed, 1 insertions, 17 deletions
diff --git a/crates/parser/src/grammar/expressions.rs b/crates/parser/src/grammar/expressions.rs
index fe1316c9bf..389c01933c 100644
--- a/crates/parser/src/grammar/expressions.rs
+++ b/crates/parser/src/grammar/expressions.rs
@@ -678,8 +678,6 @@ fn path_expr(p: &mut Parser<'_>, r: Restrictions) -> (CompletedMarker, BlockLike
// S { x };
// S { x, y: 32, };
// S { x, y: 32, ..Default::default() };
-// S { x, y: 32, .. };
-// S { .. };
// S { x: ::default() };
// TupleStruct { 0: 1 };
// }
@@ -711,8 +709,6 @@ pub(crate) fn record_expr_field_list(p: &mut Parser<'_>) {
// fn main() {
// S { field ..S::default() }
// S { 0 ..S::default() }
- // S { field .. }
- // S { 0 .. }
// }
name_ref_or_index(p);
p.error("expected `:`");
@@ -743,13 +739,7 @@ pub(crate) fn record_expr_field_list(p: &mut Parser<'_>) {
// S { .. } = S {};
// }
- // test struct_initializer_with_defaults
- // fn foo() {
- // let _s = S { .. };
- // }
-
- // We permit `.. }` on the left-hand side of a destructuring assignment
- // or defaults values.
+ // We permit `.. }` on the left-hand side of a destructuring assignment.
if !p.at(T!['}']) {
expr(p);
@@ -760,12 +750,6 @@ pub(crate) fn record_expr_field_list(p: &mut Parser<'_>) {
// S { ..x, a: 0 }
// }
- // test_err comma_after_default_values_syntax
- // fn foo() {
- // S { .., };
- // S { .., a: 0 }
- // }
-
// Do not bump, so we can support additional fields after this comma.
p.error("cannot use a comma after the base struct");
}