pub struct ExprLoweringContext<'a> {
pub owner: &'a DagId,
pub resolver: &'a ModuleResolver,
pub generic_scope: &'a GenericScope,
pub prelude: Option<&'a PreludeTypeScope>,
pub decl_bindings: Option<&'a HashMap<ScopedName, ResolvedName<Decl>>>,
}Expand description
Context required to lower one expression tree into HIR.
Fields§
§owner: &'a DagId§resolver: &'a ModuleResolver§generic_scope: &'a GenericScope§prelude: Option<&'a PreludeTypeScope>§decl_bindings: Option<&'a HashMap<ScopedName, ResolvedName<Decl>>>Implementations§
Source§impl<'a> ExprLoweringContext<'a>
impl<'a> ExprLoweringContext<'a>
Sourcepub const fn new(
owner: &'a DagId,
resolver: &'a ModuleResolver,
generic_scope: &'a GenericScope,
) -> Self
pub const fn new( owner: &'a DagId, resolver: &'a ModuleResolver, generic_scope: &'a GenericScope, ) -> Self
Create an expression-lowering context.
Sourcepub const fn with_prelude(self, prelude: &'a PreludeTypeScope) -> Self
pub const fn with_prelude(self, prelude: &'a PreludeTypeScope) -> Self
Add implicit prelude type symbols for lowering type arguments.
Sourcepub const fn with_decl_bindings(
self,
decl_bindings: &'a HashMap<ScopedName, ResolvedName<Decl>>,
) -> Self
pub const fn with_decl_bindings( self, decl_bindings: &'a HashMap<ScopedName, ResolvedName<Decl>>, ) -> Self
Add canonical declaration bindings for declarations already visible in the lowered IR, such as prefixed dependency entries and DAG self-imports.
Trait Implementations§
Source§impl<'a> Clone for ExprLoweringContext<'a>
impl<'a> Clone for ExprLoweringContext<'a>
Source§fn clone(&self) -> ExprLoweringContext<'a>
fn clone(&self) -> ExprLoweringContext<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for ExprLoweringContext<'a>
Auto Trait Implementations§
impl<'a> Freeze for ExprLoweringContext<'a>
impl<'a> RefUnwindSafe for ExprLoweringContext<'a>
impl<'a> Send for ExprLoweringContext<'a>
impl<'a> Sync for ExprLoweringContext<'a>
impl<'a> Unpin for ExprLoweringContext<'a>
impl<'a> UnsafeUnpin for ExprLoweringContext<'a>
impl<'a> UnwindSafe for ExprLoweringContext<'a>
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