From e63315b8f189396cf556f21d4ca27ae4281d17d7 Mon Sep 17 00:00:00 2001 From: Josh Mcguigan Date: Wed, 8 Apr 2020 20:23:51 -0700 Subject: add record pat missing field diagnostic --- crates/ra_hir_def/src/expr.rs | 33 ++++++--------------------------- 1 file changed, 6 insertions(+), 27 deletions(-) (limited to 'crates/ra_hir_def/src/expr.rs') diff --git a/crates/ra_hir_def/src/expr.rs b/crates/ra_hir_def/src/expr.rs index 197bbe9bd..e11bdf3ec 100644 --- a/crates/ra_hir_def/src/expr.rs +++ b/crates/ra_hir_def/src/expr.rs @@ -376,35 +376,14 @@ pub enum Pat { Wild, Tuple(Vec), Or(Vec), - Record { - path: Option, - args: Vec, - // FIXME: 'ellipsis' option - }, - Range { - start: ExprId, - end: ExprId, - }, - Slice { - prefix: Vec, - slice: Option, - suffix: Vec, - }, + Record { path: Option, args: Vec, ellipsis: bool }, + Range { start: ExprId, end: ExprId }, + Slice { prefix: Vec, slice: Option, suffix: Vec }, Path(Path), Lit(ExprId), - Bind { - mode: BindingAnnotation, - name: Name, - subpat: Option, - }, - TupleStruct { - path: Option, - args: Vec, - }, - Ref { - pat: PatId, - mutability: Mutability, - }, + Bind { mode: BindingAnnotation, name: Name, subpat: Option }, + TupleStruct { path: Option, args: Vec }, + Ref { pat: PatId, mutability: Mutability }, } impl Pat { -- cgit v1.2.3