From 0e47a4a9d3935929f88f76b2d41ee0a3fee481b6 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Wed, 18 Jul 2018 15:24:00 -0400 Subject: [PATCH] use proper body-id and span when solving obligations --- src/librustc/traits/query/outlives_bounds.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librustc/traits/query/outlives_bounds.rs b/src/librustc/traits/query/outlives_bounds.rs index 6d48e7601cb3..f79ce73ad928 100644 --- a/src/librustc/traits/query/outlives_bounds.rs +++ b/src/librustc/traits/query/outlives_bounds.rs @@ -99,7 +99,7 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> { pub fn implied_outlives_bounds( &self, param_env: ty::ParamEnv<'tcx>, - _body_id: ast::NodeId, + body_id: ast::NodeId, ty: Ty<'tcx>, span: Span, ) -> Vec> { @@ -120,7 +120,7 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> { assert!(result.value.is_proven()); 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); let result = match result { Ok(v) => v,