1
Fork 0

account for the pick-constraint edges when reporting errors

Also, thread through better span info to improve the error message to
something tolerable.
This commit is contained in:
Niko Matsakis 2019-06-17 08:40:50 -04:00
parent 3e01c7416a
commit 0b15a66a80
10 changed files with 195 additions and 18 deletions

View file

@ -910,13 +910,14 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
pub fn pick_constraint(
&self,
opaque_type_def_id: DefId,
definition_span: Span,
hidden_ty: Ty<'tcx>,
region: ty::Region<'tcx>,
in_regions: &Rc<Vec<ty::Region<'tcx>>>,
) {
debug!("sub_regions({:?} <: {:?})", region, in_regions);
self.borrow_region_constraints()
.pick_constraint(opaque_type_def_id, hidden_ty, region, in_regions);
.pick_constraint(opaque_type_def_id, definition_span, hidden_ty, region, in_regions);
}
pub fn subtype_predicate(