Skip to content

Commit

Permalink
Address review comment
Browse files Browse the repository at this point in the history
canonicalize_chalk_query -> canonicalize_query_preserving_universes
  • Loading branch information
matthewjasper committed Feb 12, 2022
1 parent f718b51 commit 030c508
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion compiler/rustc_infer/src/infer/canonical/canonicalizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ impl<'cx, 'tcx> InferCtxt<'cx, 'tcx> {
/// example, canonicalizing `&'?0: Trait<'?1>`, where `'?0` is in `U1` and
/// `'?1` is in `U3` would be canonicalized to have ?0` in `U1` and `'?1`
/// in `U2`.
pub fn canonicalize_chalk_query<V>(
///
/// This is used for Chalk integration.
pub fn canonicalize_query_preserving_universes<V>(
&self,
value: V,
query_state: &mut OriginalQueryValues<'tcx>,
Expand Down
3 changes: 2 additions & 1 deletion compiler/rustc_trait_selection/src/traits/chalk_fulfill.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ impl<'tcx> TraitEngine<'tcx> for FulfillmentContext<'tcx> {
continue;
}

let canonical_goal = infcx.canonicalize_chalk_query(goal, &mut orig_values);
let canonical_goal =
infcx.canonicalize_query_preserving_universes(goal, &mut orig_values);

match infcx.tcx.evaluate_goal(canonical_goal) {
Ok(response) => {
Expand Down

0 comments on commit 030c508

Please sign in to comment.