Skip to content

Commit 5dc04d8

Browse files
Apply suggestions from code review
Co-authored-by: beef <[email protected]>
1 parent ebfd56f commit 5dc04d8

File tree

1 file changed

+4
-4
lines changed
  • compiler/rustc_trait_selection/src/traits/specialize

1 file changed

+4
-4
lines changed

Diff for: compiler/rustc_trait_selection/src/traits/specialize/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -269,11 +269,11 @@ pub(super) fn specializes(
269269
return false;
270270
}
271271

272-
// create a parameter environment corresponding to an identity instantiation of impl1,
273-
// i.e. the most generic instantiation of impl1.
272+
// create a parameter environment corresponding to an identity instantiation of the specializing impl,
273+
// i.e. the most generic instantiation of the specializing impl.
274274
let param_env = tcx.param_env(specializing_impl_def_id);
275275

276-
// Create an infcx, taking the predicates of impl1 as assumptions:
276+
// Create an infcx, taking the predicates of the specializing impl as assumptions:
277277
let infcx = tcx.infer_ctxt().build(TypingMode::non_body_analysis());
278278

279279
let specializing_impl_trait_ref =
@@ -284,7 +284,7 @@ pub(super) fn specializes(
284284
param_env, specializing_impl_trait_ref, parent_impl_def_id
285285
);
286286

287-
// Attempt to prove that impl2 applies, given all of the above.
287+
// Attempt to prove that the parent impl applies, given all of the above.
288288

289289
let ocx = ObligationCtxt::new(&infcx);
290290
let specializing_impl_trait_ref = ocx.normalize(cause, param_env, specializing_impl_trait_ref);

0 commit comments

Comments
 (0)