pub(crate) fn implied_bounds_query_var_values<'tcx>(
tcx: TyCtxt<'tcx>,
unnormalized_inputs_and_output: &[Ty<'tcx>],
is_external_region: impl FnMut(Region<'tcx>) -> bool,
) -> SmallVec<[GenericArg<'tcx>; 8]>Expand description
This computes the var_values used by the mir_borrowck_implied_outlives_bounds query.
The old solver canonicalization does not replace early and late bound parameters,
so the only var_values we need are external regions from the signature of the nested
body as we don’t have a shared representation between this query and MIR borrowck.
These are not all external regions of the nested body, only the external regions
which may get accessed by this query. We only need to add things to the var_values
which can be referenced by both this query and MIR borrowck. MIR borrowck currently
creates external regions for late-bound regions of parent items as these can be
explicitly mentioned in user types. We do not encounter these in this query, as all
free regions in the signature of nested bodies get replaced with 'erased at the end
of HIR typeck, so we don’t care about them.