Merge commit 'e36a20c24f' into ra-sync-and-pms-component

This commit is contained in:
Amos Wenger 2022-07-26 11:53:50 +02:00
parent dfe84494c1
commit a1f1b95d00
48 changed files with 627 additions and 213 deletions

View file

@ -305,7 +305,10 @@ pub fn record_literal_missing_fields(
expr: &Expr,
) -> Option<(VariantId, Vec<LocalFieldId>, /*exhaustive*/ bool)> {
let (fields, exhaustive) = match expr {
Expr::RecordLit { path: _, fields, spread } => (fields, spread.is_none()),
Expr::RecordLit { fields, spread, ellipsis, is_assignee_expr, .. } => {
let exhaustive = if *is_assignee_expr { !*ellipsis } else { spread.is_none() };
(fields, exhaustive)
}
_ => return None,
};