Skip to content

Commit 2b2a113

Browse files
committed
check/wf.rs: change to use correct span and older WF algorithm;
at the time I reinstituted the old code, I hadn't given up yet and brought back the implicator.
1 parent a7c9a15 commit 2b2a113

File tree

1 file changed

+2
-5
lines changed
  • src/librustc_typeck/check

1 file changed

+2
-5
lines changed

src/librustc_typeck/check/wf.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,8 @@ impl<'ccx, 'tcx> CheckTypeWellFormedVisitor<'ccx, 'tcx> {
178178
}
179179
}
180180

181-
let field_tys: Vec<Ty> =
182-
variants.iter().flat_map(|v| v.fields.iter().map(|f| f.ty)).collect();
183-
184-
for &field_ty in &field_tys {
185-
fcx.register_wf_obligation(field_ty, item.span, traits::MiscObligation);
181+
for field in variants.iter().flat_map(|v| v.fields.iter()) {
182+
fcx.register_old_wf_obligation(field.ty, field.span, traits::MiscObligation);
186183
}
187184
});
188185
}

0 commit comments

Comments
 (0)