pub(crate) struct GenericParamsCollector {
type_or_consts: Arena<TypeOrConstParamData>,
lifetimes: Arena<LifetimeParamData>,
where_predicates: Vec<WherePredicate>,
parent: GenericDefId,
}Fields§
§type_or_consts: Arena<TypeOrConstParamData>§lifetimes: Arena<LifetimeParamData>§where_predicates: Vec<WherePredicate>§parent: GenericDefIdImplementations§
Source§impl GenericParamsCollector
impl GenericParamsCollector
pub(crate) fn new(parent: GenericDefId) -> Self
pub(crate) fn with_self_param( ec: &mut ExprCollector<'_>, parent: GenericDefId, bounds: Option<TypeBoundList>, ) -> Self
pub(crate) fn lower( &mut self, ec: &mut ExprCollector<'_>, generic_param_list: Option<GenericParamList>, where_clause: Option<WhereClause>, )
pub(crate) fn collect_impl_trait<R>( &mut self, ec: &mut ExprCollector<'_>, cb: impl FnOnce(&mut ExprCollector<'_>, &'_ mut dyn for<'ec, 'db> FnMut(&'ec mut ExprCollector<'db>, TypePtr, ThinVec<TypeBound>) -> TypeRefId) -> R, ) -> R
pub(crate) fn finish(self) -> GenericParams
fn lower_param_list( &mut self, ec: &mut ExprCollector<'_>, params: GenericParamList, )
fn lower_where_predicates( &mut self, ec: &mut ExprCollector<'_>, where_clause: WhereClause, )
fn lower_bounds( &mut self, ec: &mut ExprCollector<'_>, type_bounds: Option<TypeBoundList>, target: Either<TypeRefId, LifetimeRefId>, )
fn lower_type_bound_as_predicate( &mut self, ec: &mut ExprCollector<'_>, bound: TypeBound, hrtb_lifetimes: Option<&[Name]>, target: Either<TypeRefId, LifetimeRefId>, )
fn lower_argument_impl_trait( type_or_consts: &mut Arena<TypeOrConstParamData>, where_predicates: &mut Vec<WherePredicate>, parent: GenericDefId, ) -> impl for<'ec, 'db> FnMut(&'ec mut ExprCollector<'db>, TypePtr, ThinVec<TypeBound>) -> TypeRefId
fn fill_self_param( &mut self, ec: &mut ExprCollector<'_>, bounds: Option<TypeBoundList>, )
pub(crate) fn update_to_late_bound_lifetimes( &mut self, named_lifetime_store: &NamedLifetimeStore, )
Auto Trait Implementations§
impl Freeze for GenericParamsCollector
impl RefUnwindSafe for GenericParamsCollector
impl Send for GenericParamsCollector
impl Sync for GenericParamsCollector
impl Unpin for GenericParamsCollector
impl UnsafeUnpin for GenericParamsCollector
impl UnwindSafe for GenericParamsCollector
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more