1
Fork 0

Move outlives env computation into methods

This commit is contained in:
Michael Goulet 2025-01-25 04:26:32 +00:00
parent 2b8930c71c
commit 48b7e38c06
8 changed files with 71 additions and 49 deletions

View file

@ -59,12 +59,6 @@ pub struct OutlivesEnvironment<'tcx> {
pub type RegionBoundPairs<'tcx> = FxIndexSet<ty::OutlivesPredicate<'tcx, GenericKind<'tcx>>>;
impl<'tcx> OutlivesEnvironment<'tcx> {
/// Create a new `OutlivesEnvironment` without extra outlives bounds.
#[inline]
pub fn new(param_env: ty::ParamEnv<'tcx>) -> Self {
Self::with_bounds(param_env, vec![])
}
/// Create a new `OutlivesEnvironment` with extra outlives bounds.
pub fn with_bounds(
param_env: ty::ParamEnv<'tcx>,