about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/solve/trait_goals.rs
diff options
context:
space:
mode:
authorShoyu Vanilla <modulo641@gmail.com>2024-02-12 15:39:32 +0900
committerShoyu Vanilla <modulo641@gmail.com>2024-02-12 15:46:35 +0900
commit3856df059ed90b8fd19a82efbfb9da36f68e6bb9 (patch)
tree7a43e8e838ec0c6fc06a3e9f9b77c4e77246f179 /compiler/rustc_trait_selection/src/solve/trait_goals.rs
parent084ce5bdb5f7dc1c725f6770a8de281165ba3b0a (diff)
downloadrust-3856df059ed90b8fd19a82efbfb9da36f68e6bb9.tar.gz
rust-3856df059ed90b8fd19a82efbfb9da36f68e6bb9.zip
Dejargnonize subst
Diffstat (limited to 'compiler/rustc_trait_selection/src/solve/trait_goals.rs')
-rw-r--r--compiler/rustc_trait_selection/src/solve/trait_goals.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_trait_selection/src/solve/trait_goals.rs b/compiler/rustc_trait_selection/src/solve/trait_goals.rs
index 044832224e5..32b46c7ac44 100644
--- a/compiler/rustc_trait_selection/src/solve/trait_goals.rs
+++ b/compiler/rustc_trait_selection/src/solve/trait_goals.rs
@@ -877,8 +877,8 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
         let a_tail_ty = tail_field_ty.instantiate(tcx, a_args);
         let b_tail_ty = tail_field_ty.instantiate(tcx, b_args);
 
-        // Substitute just the unsizing params from B into A. The type after
-        // this substitution must be equal to B. This is so we don't unsize
+        // Instantiate just the unsizing params from B into A. The type after
+        // this instantiation must be equal to B. This is so we don't unsize
         // unrelated type parameters.
         let new_a_args = tcx.mk_args_from_iter(
             a_args
@@ -927,7 +927,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
         let (&a_last_ty, a_rest_tys) = a_tys.split_last().unwrap();
         let &b_last_ty = b_tys.last().unwrap();
 
-        // Substitute just the tail field of B., and require that they're equal.
+        // Instantiate just the tail field of B., and require that they're equal.
         let unsized_a_ty =
             Ty::new_tup_from_iter(tcx, a_rest_tys.iter().copied().chain([b_last_ty]));
         self.eq(goal.param_env, unsized_a_ty, b_ty)?;