rustc/ty: calculate span after a possible early continue
This commit is contained in:
parent
774881d78e
commit
db171649d3
1 changed files with 1 additions and 1 deletions
|
|
@ -205,11 +205,11 @@ impl<'tcx> ty::ParamEnv<'tcx> {
|
|||
let mut infringing = Vec::new();
|
||||
for variant in &adt.variants {
|
||||
for field in &variant.fields {
|
||||
let span = tcx.def_span(field.did);
|
||||
let ty = field.ty(tcx, substs);
|
||||
if ty.references_error() {
|
||||
continue;
|
||||
}
|
||||
let span = tcx.def_span(field.did);
|
||||
let cause = ObligationCause { span, ..ObligationCause::dummy() };
|
||||
let ctx = traits::FulfillmentContext::new();
|
||||
match traits::fully_normalize(&infcx, ctx, cause, self, &ty) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue