pub struct ExprCollector<'db> {
pub store: ExpressionStoreBuilder,
/* private fields */
}
Fields§
§store: ExpressionStoreBuilder
Implementations§
Source§impl ExprCollector<'_>
impl ExprCollector<'_>
pub fn new( db: &dyn DefDatabase, module: ModuleId, current_file_id: HirFileId, ) -> ExprCollector<'_>
pub fn lower_lifetime_ref(&mut self, lifetime: Lifetime) -> LifetimeRefId
pub fn lower_lifetime_ref_opt( &mut self, lifetime: Option<Lifetime>, ) -> LifetimeRefId
Sourcepub fn lower_type_ref(
&mut self,
node: Type,
impl_trait_lower_fn: &'_ mut dyn for<'ec, 'db> FnMut(&'ec mut ExprCollector<'db>, TypePtr, ThinVec<TypeBound>) -> TypeRefId,
) -> TypeRefId
pub fn lower_type_ref( &mut self, node: Type, impl_trait_lower_fn: &'_ mut dyn for<'ec, 'db> FnMut(&'ec mut ExprCollector<'db>, TypePtr, ThinVec<TypeBound>) -> TypeRefId, ) -> TypeRefId
Converts an ast::TypeRef
to a hir::TypeRef
.
pub fn lower_path( &mut self, ast: Path, impl_trait_lower_fn: &'_ mut dyn for<'ec, 'db> FnMut(&'ec mut ExprCollector<'db>, TypePtr, ThinVec<TypeBound>) -> TypeRefId, ) -> Option<Path>
pub fn impl_trait_error_allocator( ec: &mut ExprCollector<'_>, ptr: TypePtr, _: ThinVec<TypeBound>, ) -> TypeRefId
Sourcepub fn lower_generic_args_from_fn_path(
&mut self,
args: Option<ParenthesizedArgList>,
ret_type: Option<RetType>,
impl_trait_lower_fn: &'_ mut dyn for<'ec, 'db> FnMut(&'ec mut ExprCollector<'db>, TypePtr, ThinVec<TypeBound>) -> TypeRefId,
) -> Option<GenericArgs>
pub fn lower_generic_args_from_fn_path( &mut self, args: Option<ParenthesizedArgList>, ret_type: Option<RetType>, impl_trait_lower_fn: &'_ mut dyn for<'ec, 'db> FnMut(&'ec mut ExprCollector<'db>, TypePtr, ThinVec<TypeBound>) -> TypeRefId, ) -> Option<GenericArgs>
Collect GenericArgs
from the parts of a fn-like path, i.e. Fn(X, Y) -> Z
(which desugars to Fn<(X, Y), Output=Z>
).
Auto Trait Implementations§
impl<'db> Freeze for ExprCollector<'db>
impl<'db> !RefUnwindSafe for ExprCollector<'db>
impl<'db> !Send for ExprCollector<'db>
impl<'db> !Sync for ExprCollector<'db>
impl<'db> Unpin for ExprCollector<'db>
impl<'db> !UnwindSafe for ExprCollector<'db>
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>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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