use proper body-id and span when solving obligations

This commit is contained in:
Niko Matsakis 2018-07-18 15:24:00 -04:00
parent 596ff12432
commit 0e47a4a9d3

View File

@ -99,7 +99,7 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
pub fn implied_outlives_bounds( pub fn implied_outlives_bounds(
&self, &self,
param_env: ty::ParamEnv<'tcx>, param_env: ty::ParamEnv<'tcx>,
_body_id: ast::NodeId, body_id: ast::NodeId,
ty: Ty<'tcx>, ty: Ty<'tcx>,
span: Span, span: Span,
) -> Vec<OutlivesBound<'tcx>> { ) -> Vec<OutlivesBound<'tcx>> {
@ -120,7 +120,7 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
assert!(result.value.is_proven()); assert!(result.value.is_proven());
let result = self.instantiate_query_result_and_region_obligations( let result = self.instantiate_query_result_and_region_obligations(
&ObligationCause::dummy(), param_env, &orig_values, &result); &ObligationCause::misc(span, body_id), param_env, &orig_values, &result);
debug!("implied_outlives_bounds for {:?}: {:#?}", ty, result); debug!("implied_outlives_bounds for {:?}: {:#?}", ty, result);
let result = match result { let result = match result {
Ok(v) => v, Ok(v) => v,