Skip to content

Commit b4db387

Browse files
committed
address review comments
1 parent 0152d33 commit b4db387

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/librustc/infer/canonical/query_response.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,7 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
125125
/// include all region obligations, so this includes all cases
126126
/// that care about regions) with this function, you have to
127127
/// do it yourself, by e.g. having them be a part of the answer.
128-
///
129-
/// TDFX(nikomatsakis): not sure this is the best name.
130-
pub fn make_query_response_with_obligations_pending<T>(
128+
pub fn make_query_response_ignoring_pending_obligations<T>(
131129
&self,
132130
inference_vars: CanonicalVarValues<'tcx>,
133131
answer: T

src/librustc_typeck/check/method/probe.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
276276
param_env_and_self_ty, self_ty);
277277
MethodAutoderefStepsResult {
278278
steps: Lrc::new(vec![CandidateStep {
279-
self_ty: self.make_query_response_with_obligations_pending(
279+
self_ty: self.make_query_response_ignoring_pending_obligations(
280280
canonical_inference_vars, self_ty),
281281
autoderefs: 0,
282282
from_unsafe_deref: false,
@@ -387,7 +387,7 @@ fn method_autoderef_steps<'a, 'gcx, 'tcx>(tcx: TyCtxt<'a, 'gcx, 'gcx>,
387387
let mut steps: Vec<_> = autoderef.by_ref()
388388
.map(|(ty, d)| {
389389
let step = CandidateStep {
390-
self_ty: infcx.make_query_response_with_obligations_pending(
390+
self_ty: infcx.make_query_response_ignoring_pending_obligations(
391391
inference_vars.clone(), ty),
392392
autoderefs: d,
393393
from_unsafe_deref: reached_raw_pointer,
@@ -407,15 +407,15 @@ fn method_autoderef_steps<'a, 'gcx, 'tcx>(tcx: TyCtxt<'a, 'gcx, 'gcx>,
407407
ty::Error => {
408408
Some(MethodAutoderefBadTy {
409409
reached_raw_pointer,
410-
ty: infcx.make_query_response_with_obligations_pending(
410+
ty: infcx.make_query_response_ignoring_pending_obligations(
411411
inference_vars, final_ty)
412412
})
413413
}
414414
ty::Array(elem_ty, _) => {
415415
let dereferences = steps.len() - 1;
416416

417417
steps.push(CandidateStep {
418-
self_ty: infcx.make_query_response_with_obligations_pending(
418+
self_ty: infcx.make_query_response_ignoring_pending_obligations(
419419
inference_vars, infcx.tcx.mk_slice(elem_ty)),
420420
autoderefs: dereferences,
421421
// this could be from an unsafe deref if we had

0 commit comments

Comments
 (0)