add record pat missing field diagnostic

This commit is contained in:
Josh Mcguigan 2020-04-08 20:23:51 -07:00
parent 176f7f6117
commit e63315b8f1
7 changed files with 159 additions and 57 deletions

View file

@ -376,35 +376,14 @@ pub enum Pat {
Wild,
Tuple(Vec<PatId>),
Or(Vec<PatId>),
Record {
path: Option<Path>,
args: Vec<RecordFieldPat>,
// FIXME: 'ellipsis' option
},
Range {
start: ExprId,
end: ExprId,
},
Slice {
prefix: Vec<PatId>,
slice: Option<PatId>,
suffix: Vec<PatId>,
},
Record { path: Option<Path>, args: Vec<RecordFieldPat>, ellipsis: bool },
Range { start: ExprId, end: ExprId },
Slice { prefix: Vec<PatId>, slice: Option<PatId>, suffix: Vec<PatId> },
Path(Path),
Lit(ExprId),
Bind {
mode: BindingAnnotation,
name: Name,
subpat: Option<PatId>,
},
TupleStruct {
path: Option<Path>,
args: Vec<PatId>,
},
Ref {
pat: PatId,
mutability: Mutability,
},
Bind { mode: BindingAnnotation, name: Name, subpat: Option<PatId> },
TupleStruct { path: Option<Path>, args: Vec<PatId> },
Ref { pat: PatId, mutability: Mutability },
}
impl Pat {