bound_vars -> infer: don't return lt map

This commit is contained in:
lcnr
2022-06-02 12:48:56 +02:00
parent 543ca7d9e7
commit cc013e05b4
16 changed files with 40 additions and 54 deletions

View File

@@ -421,14 +421,11 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
let object_trait_ref = data.principal().unwrap_or_else(|| {
span_bug!(obligation.cause.span, "object candidate with no principal")
});
let object_trait_ref = self
.infcx
.replace_bound_vars_with_fresh_vars(
obligation.cause.span,
HigherRankedType,
object_trait_ref,
)
.0;
let object_trait_ref = self.infcx.replace_bound_vars_with_fresh_vars(
obligation.cause.span,
HigherRankedType,
object_trait_ref,
);
let object_trait_ref = object_trait_ref.with_self_ty(self.tcx(), self_ty);
let mut nested = vec![];

View File

@@ -1453,7 +1453,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
potentially_unnormalized_candidates: bool,
) -> ProjectionMatchesProjection {
let mut nested_obligations = Vec::new();
let (infer_predicate, _) = self.infcx.replace_bound_vars_with_fresh_vars(
let infer_predicate = self.infcx.replace_bound_vars_with_fresh_vars(
obligation.cause.span,
LateBoundRegionConversionTime::HigherRankedType,
env_predicate,