Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/expr_store/pretty.rs')
-rw-r--r--crates/hir-def/src/expr_store/pretty.rs18
1 files changed, 6 insertions, 12 deletions
diff --git a/crates/hir-def/src/expr_store/pretty.rs b/crates/hir-def/src/expr_store/pretty.rs
index 1b3a1bb4dc..9a8a8c2cd0 100644
--- a/crates/hir-def/src/expr_store/pretty.rs
+++ b/crates/hir-def/src/expr_store/pretty.rs
@@ -8,7 +8,7 @@ use span::Edition;
use crate::{
hir::{
Array, BindingAnnotation, CaptureBy, ClosureKind, Literal, LiteralOrConst, Movability,
- Spread, Statement,
+ Statement,
},
pretty::{print_generic_args, print_path, print_type_ref},
VariantId,
@@ -398,7 +398,7 @@ impl Printer<'_> {
self.print_expr(*expr);
}
}
- Expr::RecordLit { path, fields, spread } => {
+ Expr::RecordLit { path, fields, spread, ellipsis: _ } => {
match path {
Some(path) => self.print_path(path),
None => w!(self, "�"),
@@ -412,16 +412,10 @@ impl Printer<'_> {
p.print_expr(field.expr);
wln!(p, ",");
}
- match spread {
- Spread::No => {}
- Spread::Yes => {
- w!(p, "..");
- }
- Spread::Base(expr) => {
- w!(p, "..");
- p.print_expr(*expr);
- wln!(p);
- }
+ if let Some(spread) = spread {
+ w!(p, "..");
+ p.print_expr(*spread);
+ wln!(p);
}
});
w!(self, "}}");