Dejargnonize subst
This commit is contained in:
parent
084ce5bdb5
commit
3856df059e
128 changed files with 574 additions and 541 deletions
|
@ -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)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue