Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/hir.rs')
| -rw-r--r-- | crates/hir-def/src/hir.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/crates/hir-def/src/hir.rs b/crates/hir-def/src/hir.rs index 53be0de7d9..7781a8fe54 100644 --- a/crates/hir-def/src/hir.rs +++ b/crates/hir-def/src/hir.rs @@ -187,6 +187,13 @@ impl From<ast::LiteralKind> for Literal { } } +#[derive(Debug, Clone, Eq, PartialEq, Copy)] +pub enum RecordSpread { + None, + FieldDefaults, + Expr(ExprId), +} + #[derive(Debug, Clone, Eq, PartialEq)] pub enum Expr { /// This is produced if the syntax tree does not have a required expression piece. @@ -259,7 +266,7 @@ pub enum Expr { RecordLit { path: Option<Box<Path>>, fields: Box<[RecordLitField]>, - spread: Option<ExprId>, + spread: RecordSpread, }, Field { expr: ExprId, |