Struct ra_ap_hir_ty::TyLoweringContext
source · [−]pub struct TyLoweringContext<'a> {
pub db: &'a dyn HirDatabase,
pub resolver: &'a Resolver,
pub type_param_mode: ParamLoweringMode,
pub impl_trait_mode: ImplTraitLoweringMode,
/* private fields */
}
Fields
db: &'a dyn HirDatabase
resolver: &'a Resolver
type_param_mode: ParamLoweringMode
Note: Conceptually, it’s thinkable that we could be in a location where some type params should be represented as placeholders, and others should be converted to variables. I think in practice, this isn’t possible currently, so this should be fine for now.
impl_trait_mode: ImplTraitLoweringMode
Implementations
sourceimpl<'a> TyLoweringContext<'a>
impl<'a> TyLoweringContext<'a>
pub fn new(db: &'a dyn HirDatabase, resolver: &'a Resolver) -> Self
pub fn with_debruijn<T>(
&self,
debruijn: DebruijnIndex,
f: impl FnOnce(&TyLoweringContext<'_>) -> T
) -> T
pub fn with_shifted_in<T>(
&self,
debruijn: DebruijnIndex,
f: impl FnOnce(&TyLoweringContext<'_>) -> T
) -> T
pub fn with_impl_trait_mode(
self,
impl_trait_mode: ImplTraitLoweringMode
) -> Self
pub fn with_type_param_mode(self, type_param_mode: ParamLoweringMode) -> Self
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for TyLoweringContext<'a>
impl<'a> !Send for TyLoweringContext<'a>
impl<'a> !Sync for TyLoweringContext<'a>
impl<'a> Unpin for TyLoweringContext<'a>
impl<'a> !UnwindSafe for TyLoweringContext<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Cast for T
impl<T> Cast for T
sourcefn cast<U>(self, interner: <U as HasInterner>::Interner) -> U where
Self: CastTo<U>,
U: HasInterner,
fn cast<U>(self, interner: <U as HasInterner>::Interner) -> U where
Self: CastTo<U>,
U: HasInterner,
Cast a value to type U
using CastTo
.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more