Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/infer/closure.rs')
-rw-r--r--crates/hir-ty/src/infer/closure.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/hir-ty/src/infer/closure.rs b/crates/hir-ty/src/infer/closure.rs
index def0cb705d..0e9aed4160 100644
--- a/crates/hir-ty/src/infer/closure.rs
+++ b/crates/hir-ty/src/infer/closure.rs
@@ -1167,11 +1167,9 @@ impl InferenceContext<'_> {
};
let mut p = place.clone();
self.current_capture_span_stack.push(MirSpan::PatId(arg));
- let has_default = vd.fields()[local_id].has_default;
p.projections.push(ProjectionElem::Field(Either::Left(FieldId {
parent: variant,
local_id,
- has_default,
})));
self.consume_with_pat(p, arg);
self.current_capture_span_stack.pop();
@@ -1221,13 +1219,12 @@ impl InferenceContext<'_> {
.iter()
.zip(fields.clone())
.chain(ar.iter().rev().zip(fields.rev()));
- for (&arg, (i, d)) in it {
+ for (&arg, (i, _)) in it {
let mut p = place.clone();
self.current_capture_span_stack.push(MirSpan::PatId(arg));
p.projections.push(ProjectionElem::Field(Either::Left(FieldId {
parent: variant,
local_id: i,
- has_default: d.has_default,
})));
self.consume_with_pat(p, arg);
self.current_capture_span_stack.pop();