Skip to content

Commit 3dd0f5a

Browse files
committed
canonical_inference_vars -> var_values
1 parent f27b152 commit 3dd0f5a

File tree

4 files changed

+9
-12
lines changed

4 files changed

+9
-12
lines changed

compiler/rustc_hir_typeck/src/method/probe.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -403,15 +403,13 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
403403
// special handling for this "trivial case" is a good idea.
404404

405405
let infcx = &self.infcx;
406-
let (ParamEnvAnd { param_env: _, value: self_ty }, canonical_inference_vars) =
406+
let (ParamEnvAnd { param_env: _, value: self_ty }, var_values) =
407407
infcx.instantiate_canonical(span, &query_input.canonical);
408408
debug!(?self_ty, ?query_input, "probe_op: Mode::Path");
409409
MethodAutoderefStepsResult {
410410
steps: infcx.tcx.arena.alloc_from_iter([CandidateStep {
411-
self_ty: self.make_query_response_ignoring_pending_obligations(
412-
canonical_inference_vars,
413-
self_ty,
414-
),
411+
self_ty: self
412+
.make_query_response_ignoring_pending_obligations(var_values, self_ty),
415413
autoderefs: 0,
416414
from_unsafe_deref: false,
417415
unsize: false,

compiler/rustc_infer/src/infer/canonical/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ impl<'tcx> InferCtxt<'tcx> {
6767
.chain((1..=canonical.max_universe.as_u32()).map(|_| self.create_next_universe()))
6868
.collect();
6969

70-
let canonical_inference_vars: ty::CanonicalVarValues<TyCtxt<'_>> =
70+
let var_values: ty::CanonicalVarValues<TyCtxt<'_>> =
7171
CanonicalVarValues::instantiate(self.tcx, &canonical.variables, |var_values, info| {
7272
self.instantiate_canonical_var(span, info, &var_values, |ui| universes[ui])
7373
});
74-
let result = canonical.instantiate(self.tcx, &canonical_inference_vars);
75-
(result, canonical_inference_vars)
74+
let result = canonical.instantiate(self.tcx, &var_values);
75+
(result, var_values)
7676
}
7777

7878
/// Given the "info" about a canonical variable, creates a fresh

compiler/rustc_trait_selection/src/infer.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,9 @@ impl<'tcx> InferCtxtBuilder<'tcx> {
184184
R: Debug + TypeFoldable<TyCtxt<'tcx>>,
185185
Canonical<'tcx, QueryResponse<'tcx, R>>: ArenaAllocatable<'tcx>,
186186
{
187-
let (infcx, key, canonical_inference_vars) =
188-
self.build_with_canonical(DUMMY_SP, canonical_key);
187+
let (infcx, key, var_values) = self.build_with_canonical(DUMMY_SP, canonical_key);
189188
let ocx = ObligationCtxt::new(&infcx);
190189
let value = operation(&ocx, key)?;
191-
ocx.make_canonicalized_query_response(canonical_inference_vars, value)
190+
ocx.make_canonicalized_query_response(var_values, value)
192191
}
193192
}

compiler/rustc_traits/src/evaluate_obligation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fn evaluate_obligation<'tcx>(
1919
) -> Result<EvaluationResult, OverflowError> {
2020
assert!(!tcx.next_trait_solver_globally());
2121
debug!("evaluate_obligation(canonical_goal={:#?})", canonical_goal);
22-
let (ref infcx, goal, _canonical_inference_vars) =
22+
let (ref infcx, goal, _var_values) =
2323
tcx.infer_ctxt().build_with_canonical(DUMMY_SP, &canonical_goal);
2424
debug!("evaluate_obligation: goal={:#?}", goal);
2525
let ParamEnvAnd { param_env, value: predicate } = goal;

0 commit comments

Comments
 (0)