Skip to content

Commit 0e47a4a

Browse files
committed
use proper body-id and span when solving obligations
1 parent 596ff12 commit 0e47a4a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustc/traits/query/outlives_bounds.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
9999
pub fn implied_outlives_bounds(
100100
&self,
101101
param_env: ty::ParamEnv<'tcx>,
102-
_body_id: ast::NodeId,
102+
body_id: ast::NodeId,
103103
ty: Ty<'tcx>,
104104
span: Span,
105105
) -> Vec<OutlivesBound<'tcx>> {
@@ -120,7 +120,7 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
120120
assert!(result.value.is_proven());
121121

122122
let result = self.instantiate_query_result_and_region_obligations(
123-
&ObligationCause::dummy(), param_env, &orig_values, &result);
123+
&ObligationCause::misc(span, body_id), param_env, &orig_values, &result);
124124
debug!("implied_outlives_bounds for {:?}: {:#?}", ty, result);
125125
let result = match result {
126126
Ok(v) => v,

0 commit comments

Comments
 (0)