Skip to content

Commit

Permalink
Added in explicit check for the type being matched
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianKnodt committed Jul 31, 2020
1 parent 011e0ef commit 96b5dee
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/librustc_typeck/variance/constraints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
);
}
}
}

Expand Down

0 comments on commit 96b5dee

Please sign in to comment.