3062: Implement slice pattern AST > HIR lowering r=jplatte a=jplatte

WIP. The necessary changes for parsing are implemented, but actual inference is not yet. Just wanted to upload what I've got so far so it doesn't get duplicated :)

Will fix #3043

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
This commit is contained in:
bors[bot] 2020-02-11 21:46:36 +00:00 committed by GitHub
commit 759100fb0d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 64 additions and 13 deletions

View file

@ -417,14 +417,14 @@ pub(crate) const AST_SRC: AstSrc = AstSrc {
pat: Pat,
guard: MatchGuard,
Expr,
}
}
struct MatchGuard { Expr }
struct RecordLit { Path, RecordFieldList }
struct RecordFieldList {
fields: [RecordField],
spread: Expr,
}
}
struct RecordField { NameRef, Expr }
struct OrPat { pats: [Pat] }
@ -434,8 +434,8 @@ pub(crate) const AST_SRC: AstSrc = AstSrc {
struct BindPat: NameOwner { Pat }
struct PlaceholderPat { }
struct DotDotPat { }
struct PathPat { Path }
struct SlicePat {}
struct PathPat { Path }
struct SlicePat { args: [Pat] }
struct RangePat {}
struct LiteralPat { Literal }