pub struct ComputationContext<'ctx> {
pub db: &'ctx dyn SemanticGroup,
pub diagnostics: &'ctx mut SemanticDiagnostics,
pub resolver: Resolver<'ctx>,
pub arenas: Arenas,
pub semantic_defs: UnorderedHashMap<VarId, Variable>,
/* private fields */
}
Expand description
Context for computing the semantic model of expression trees.
Fields§
§db: &'ctx dyn SemanticGroup
§diagnostics: &'ctx mut SemanticDiagnostics
§resolver: Resolver<'ctx>
§arenas: Arenas
Arenas of semantic objects.
semantic_defs: UnorderedHashMap<VarId, Variable>
Definitions of semantic variables.
Implementations§
Source§impl<'ctx> ComputationContext<'ctx>
impl<'ctx> ComputationContext<'ctx>
pub fn new( db: &'ctx dyn SemanticGroup, diagnostics: &'ctx mut SemanticDiagnostics, resolver: Resolver<'ctx>, signature: Option<&'ctx Signature>, environment: Environment, function_id: ContextFunction, ) -> Self
Sourcepub fn apply_inference_rewriter_to_exprs(&mut self)
pub fn apply_inference_rewriter_to_exprs(&mut self)
Applies inference rewriter to all the expressions in the computation context, and adds errors on types from the final expressions.
Auto Trait Implementations§
impl<'ctx> Freeze for ComputationContext<'ctx>
impl<'ctx> !RefUnwindSafe for ComputationContext<'ctx>
impl<'ctx> !Send for ComputationContext<'ctx>
impl<'ctx> !Sync for ComputationContext<'ctx>
impl<'ctx> Unpin for ComputationContext<'ctx>
impl<'ctx> !UnwindSafe for ComputationContext<'ctx>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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