struct EnvElaborator<'me, 'builder, I: Interner> {
    db: &'me dyn RustIrDatabase<I>,
    builder: &'builder mut ClauseBuilder<'me, I>,
    environment: &'me Environment<I>,
}

Fields§

§db: &'me dyn RustIrDatabase<I>§builder: &'builder mut ClauseBuilder<'me, I>§environment: &'me Environment<I>

Trait Implementations§

source§

impl<'me, 'builder, I: Interner> TypeVisitor<I> for EnvElaborator<'me, 'builder, I>

§

type BreakTy = ()

The “break type” of the visitor, often (). It represents the result the visitor yields when it stops visiting.
source§

fn as_dyn(&mut self) -> &mut dyn TypeVisitor<I, BreakTy = Self::BreakTy>

Creates a dyn value from this visitor. Unfortunately, this must be added manually to each impl of visitor; it permits the default implements below to create a &mut dyn TypeVisitor from Self without knowing what Self is (by invoking this method). Effectively, this limits impls of visitor to types for which we are able to create a dyn value (i.e., not [T] types).
source§

fn interner(&self) -> I

Gets the visitor’s interner.
source§

fn visit_ty( &mut self, ty: &Ty<I>, _outer_binder: DebruijnIndex ) -> ControlFlow<()>

Top-level callback: invoked for each Ty<I> that is encountered when visiting. By default, invokes super_visit_with, which will in turn invoke the more specialized visiting methods below, like visit_free_var.
source§

fn visit_domain_goal( &mut self, domain_goal: &DomainGoal<I>, outer_binder: DebruijnIndex ) -> ControlFlow<()>

Invoked for each domain goal.
source§

fn visit_lifetime( &mut self, lifetime: &Lifetime<I>, outer_binder: DebruijnIndex ) -> ControlFlow<Self::BreakTy>

Top-level callback: invoked for each Lifetime<I> that is encountered when visiting. By default, invokes super_visit_with, which will in turn invoke the more specialized visiting methods below, like visit_free_var.
source§

fn visit_const( &mut self, constant: &Const<I>, outer_binder: DebruijnIndex ) -> ControlFlow<Self::BreakTy>

Top-level callback: invoked for each Const<I> that is encountered when visiting. By default, invokes super_visit_with, which will in turn invoke the more specialized visiting methods below, like visit_free_var.
source§

fn visit_program_clause( &mut self, clause: &ProgramClause<I>, outer_binder: DebruijnIndex ) -> ControlFlow<Self::BreakTy>

Invoked for every program clause. By default, recursively visits the goals contents.
source§

fn visit_goal( &mut self, goal: &Goal<I>, outer_binder: DebruijnIndex ) -> ControlFlow<Self::BreakTy>

Invoked for every goal. By default, recursively visits the goals contents.
source§

fn forbid_free_vars(&self) -> bool

If overridden to return true, then visiting will panic if a free variable is encountered. This should be done if free type/lifetime/const variables are not expected.
source§

fn visit_free_var( &mut self, bound_var: BoundVar, outer_binder: DebruijnIndex ) -> ControlFlow<Self::BreakTy>

Invoked for BoundVar instances that are not bound within the type being visited over:
source§

fn forbid_free_placeholders(&self) -> bool

If overridden to return true, we will panic when a free placeholder type/lifetime is encountered.
source§

fn visit_free_placeholder( &mut self, universe: PlaceholderIndex, _outer_binder: DebruijnIndex ) -> ControlFlow<Self::BreakTy>

Invoked for each occurrence of a placeholder type; these are used when we instantiate binders universally.
source§

fn visit_where_clause( &mut self, where_clause: &WhereClause<I>, outer_binder: DebruijnIndex ) -> ControlFlow<Self::BreakTy>

Invoked for each where clause.
source§

fn forbid_inference_vars(&self) -> bool

If overridden to return true, inference variables will trigger panics when visited. Used when inference variables are unexpected.
source§

fn visit_inference_var( &mut self, var: InferenceVar, _outer_binder: DebruijnIndex ) -> ControlFlow<Self::BreakTy>

Invoked for each occurrence of a inference type; these are used when we instantiate binders universally.

Auto Trait Implementations§

§

impl<'me, 'builder, I> !RefUnwindSafe for EnvElaborator<'me, 'builder, I>

§

impl<'me, 'builder, I> !Send for EnvElaborator<'me, 'builder, I>

§

impl<'me, 'builder, I> !Sync for EnvElaborator<'me, 'builder, I>

§

impl<'me, 'builder, I> Unpin for EnvElaborator<'me, 'builder, I>

§

impl<'me, 'builder, I> !UnwindSafe for EnvElaborator<'me, 'builder, I>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> Cast for T

source§

fn cast<U>(self, interner: <U as HasInterner>::Interner) -> U
where Self: CastTo<U>, U: HasInterner,

Cast a value to type U using CastTo.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more