Added in explicit check for the type being matched

This commit is contained in:
kadmin 2020-07-31 21:33:55 +00:00
parent 011e0ef636
commit 96b5dee9ab
1 changed files with 7 additions and 1 deletions

View File

@ -161,7 +161,13 @@ impl<'a, 'tcx> ConstraintContext<'a, 'tcx> {
self.add_constraints_from_sig(current_item, tcx.fn_sig(def_id), self.covariant);
}
_ => {}
ty::Error(_) => {}
_ => {
span_bug!(
tcx.def_span(def_id),
"`build_constraints_for_item` unsupported for this item"
);
}
}
}