Skip to content

Commit 96b5dee

Browse files
committed
Added in explicit check for the type being matched
1 parent 011e0ef commit 96b5dee

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/librustc_typeck/variance/constraints.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,13 @@ impl<'a, 'tcx> ConstraintContext<'a, 'tcx> {
161161
self.add_constraints_from_sig(current_item, tcx.fn_sig(def_id), self.covariant);
162162
}
163163

164-
_ => {}
164+
ty::Error(_) => {}
165+
_ => {
166+
span_bug!(
167+
tcx.def_span(def_id),
168+
"`build_constraints_for_item` unsupported for this item"
169+
);
170+
}
165171
}
166172
}
167173

0 commit comments

Comments
 (0)