Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
arielb1 committed Dec 14, 2018
1 parent 0152d33 commit b4db387
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 1 addition & 3 deletions src/librustc/infer/canonical/query_response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/librustc_typeck/check/method/probe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -407,15 +407,15 @@ 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)
})
}
ty::Array(elem_ty, _) => {
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
Expand Down

0 comments on commit b4db387

Please sign in to comment.