Skip to content

Commit db17164

Browse files
committed
rustc/ty: calculate span after a possible early continue
1 parent 774881d commit db17164

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc/ty/util.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,11 @@ impl<'tcx> ty::ParamEnv<'tcx> {
205205
let mut infringing = Vec::new();
206206
for variant in &adt.variants {
207207
for field in &variant.fields {
208-
let span = tcx.def_span(field.did);
209208
let ty = field.ty(tcx, substs);
210209
if ty.references_error() {
211210
continue;
212211
}
212+
let span = tcx.def_span(field.did);
213213
let cause = ObligationCause { span, ..ObligationCause::dummy() };
214214
let ctx = traits::FulfillmentContext::new();
215215
match traits::fully_normalize(&infcx, ctx, cause, self, &ty) {

0 commit comments

Comments
 (0)