diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2018-07-18 15:24:00 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2018-07-21 15:56:48 +0300 |
| commit | 0e47a4a9d3935929f88f76b2d41ee0a3fee481b6 (patch) | |
| tree | 364d9bea7dc3873f159341fd48bbc34e25e303db | |
| parent | 596ff12432fa13ead13edc0b5f067eaf63ed19b7 (diff) | |
| download | rust-0e47a4a9d3935929f88f76b2d41ee0a3fee481b6.tar.gz rust-0e47a4a9d3935929f88f76b2d41ee0a3fee481b6.zip | |
use proper body-id and span when solving obligations
| -rw-r--r-- | src/librustc/traits/query/outlives_bounds.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc/traits/query/outlives_bounds.rs b/src/librustc/traits/query/outlives_bounds.rs index 6d48e7601cb..f79ce73ad92 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<OutlivesBound<'tcx>> { @@ -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, |
