about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAriel Ben-Yehuda <ariel.byd@gmail.com>2018-12-15 01:22:41 +0200
committerAriel Ben-Yehuda <ariel.byd@gmail.com>2018-12-15 01:22:41 +0200
commitb4db387a6c886d4242a94d997c48967abd63314c (patch)
tree5159f0ec3adbcf676c56d4319c832332884d11a4
parent0152d33bc1aa2e57800cc68c811f843e9aa6676d (diff)
downloadrust-b4db387a6c886d4242a94d997c48967abd63314c.tar.gz
rust-b4db387a6c886d4242a94d997c48967abd63314c.zip
address review comments
-rw-r--r--src/librustc/infer/canonical/query_response.rs4
-rw-r--r--src/librustc_typeck/check/method/probe.rs8
2 files changed, 5 insertions, 7 deletions
diff --git a/src/librustc/infer/canonical/query_response.rs b/src/librustc/infer/canonical/query_response.rs
index e225b12366f..ebfc20e30f7 100644
--- a/src/librustc/infer/canonical/query_response.rs
+++ b/src/librustc/infer/canonical/query_response.rs
@@ -125,9 +125,7 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
     /// include all region obligations, so this includes all cases
     /// that care about regions) with this function, you have to
     /// do it yourself, by e.g. having them be a part of the answer.
-    ///
-    /// TDFX(nikomatsakis): not sure this is the best name.
-    pub fn make_query_response_with_obligations_pending<T>(
+    pub fn make_query_response_ignoring_pending_obligations<T>(
         &self,
         inference_vars: CanonicalVarValues<'tcx>,
         answer: T
diff --git a/src/librustc_typeck/check/method/probe.rs b/src/librustc_typeck/check/method/probe.rs
index 573253c2e1b..190419048b4 100644
--- a/src/librustc_typeck/check/method/probe.rs
+++ b/src/librustc_typeck/check/method/probe.rs
@@ -276,7 +276,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
                        param_env_and_self_ty, self_ty);
                 MethodAutoderefStepsResult {
                     steps: Lrc::new(vec![CandidateStep {
-                        self_ty: self.make_query_response_with_obligations_pending(
+                        self_ty: self.make_query_response_ignoring_pending_obligations(
                             canonical_inference_vars, self_ty),
                         autoderefs: 0,
                         from_unsafe_deref: false,
@@ -387,7 +387,7 @@ fn method_autoderef_steps<'a, 'gcx, 'tcx>(tcx: TyCtxt<'a, 'gcx, 'gcx>,
         let mut steps: Vec<_> = autoderef.by_ref()
             .map(|(ty, d)| {
                 let step = CandidateStep {
-                    self_ty: infcx.make_query_response_with_obligations_pending(
+                    self_ty: infcx.make_query_response_ignoring_pending_obligations(
                         inference_vars.clone(), ty),
                     autoderefs: d,
                     from_unsafe_deref: reached_raw_pointer,
@@ -407,7 +407,7 @@ fn method_autoderef_steps<'a, 'gcx, 'tcx>(tcx: TyCtxt<'a, 'gcx, 'gcx>,
             ty::Error => {
                 Some(MethodAutoderefBadTy {
                     reached_raw_pointer,
-                    ty: infcx.make_query_response_with_obligations_pending(
+                    ty: infcx.make_query_response_ignoring_pending_obligations(
                         inference_vars, final_ty)
                 })
             }
@@ -415,7 +415,7 @@ fn method_autoderef_steps<'a, 'gcx, 'tcx>(tcx: TyCtxt<'a, 'gcx, 'gcx>,
                 let dereferences = steps.len() - 1;
 
                 steps.push(CandidateStep {
-                    self_ty: infcx.make_query_response_with_obligations_pending(
+                    self_ty: infcx.make_query_response_ignoring_pending_obligations(
                         inference_vars, infcx.tcx.mk_slice(elem_ty)),
                     autoderefs: dereferences,
                     // this could be from an unsafe deref if we had