Struct chalk_integration::lowering::program_lowerer::ProgramLowerer
source · pub(super) struct ProgramLowerer {Show 18 fields
next_item_index: u32,
associated_ty_lookups: BTreeMap<(TraitId<ChalkIr>, Identifier), AssociatedTyLookup>,
associated_ty_value_ids: BTreeMap<(ImplId<ChalkIr>, Identifier), AssociatedTyValueId<ChalkIr>>,
adt_ids: BTreeMap<Identifier, AdtId<ChalkIr>>,
fn_def_ids: BTreeMap<Identifier, FnDefId<ChalkIr>>,
closure_ids: BTreeMap<Identifier, ClosureId<ChalkIr>>,
trait_ids: BTreeMap<Identifier, TraitId<ChalkIr>>,
auto_traits: BTreeMap<TraitId<ChalkIr>, bool>,
opaque_ty_ids: BTreeMap<Identifier, OpaqueTyId<ChalkIr>>,
adt_kinds: BTreeMap<AdtId<ChalkIr>, TypeKind>,
fn_def_kinds: BTreeMap<FnDefId<ChalkIr>, TypeKind>,
coroutine_ids: BTreeMap<Identifier, CoroutineId<ChalkIr>>,
coroutine_kinds: BTreeMap<CoroutineId<ChalkIr>, TypeKind>,
closure_kinds: BTreeMap<ClosureId<ChalkIr>, TypeKind>,
trait_kinds: BTreeMap<TraitId<ChalkIr>, TypeKind>,
opaque_ty_kinds: BTreeMap<OpaqueTyId<ChalkIr>, TypeKind>,
object_safe_traits: HashSet<TraitId<ChalkIr>>,
foreign_ty_ids: BTreeMap<Identifier, ForeignDefId<ChalkIr>>,
}
Fields§
§next_item_index: u32
§associated_ty_lookups: BTreeMap<(TraitId<ChalkIr>, Identifier), AssociatedTyLookup>
§associated_ty_value_ids: BTreeMap<(ImplId<ChalkIr>, Identifier), AssociatedTyValueId<ChalkIr>>
§adt_ids: BTreeMap<Identifier, AdtId<ChalkIr>>
§fn_def_ids: BTreeMap<Identifier, FnDefId<ChalkIr>>
§closure_ids: BTreeMap<Identifier, ClosureId<ChalkIr>>
§trait_ids: BTreeMap<Identifier, TraitId<ChalkIr>>
§auto_traits: BTreeMap<TraitId<ChalkIr>, bool>
§opaque_ty_ids: BTreeMap<Identifier, OpaqueTyId<ChalkIr>>
§adt_kinds: BTreeMap<AdtId<ChalkIr>, TypeKind>
§fn_def_kinds: BTreeMap<FnDefId<ChalkIr>, TypeKind>
§coroutine_ids: BTreeMap<Identifier, CoroutineId<ChalkIr>>
§coroutine_kinds: BTreeMap<CoroutineId<ChalkIr>, TypeKind>
§closure_kinds: BTreeMap<ClosureId<ChalkIr>, TypeKind>
§trait_kinds: BTreeMap<TraitId<ChalkIr>, TypeKind>
§opaque_ty_kinds: BTreeMap<OpaqueTyId<ChalkIr>, TypeKind>
§object_safe_traits: HashSet<TraitId<ChalkIr>>
§foreign_ty_ids: BTreeMap<Identifier, ForeignDefId<ChalkIr>>
Implementations§
source§impl ProgramLowerer
impl ProgramLowerer
pub fn next_item_id(&mut self) -> RawId
sourcepub fn extract_associated_types(
&mut self,
program: &Program,
raw_ids: &[RawId],
) -> Result<(), RustIrError>
pub fn extract_associated_types( &mut self, program: &Program, raw_ids: &[RawId], ) -> Result<(), RustIrError>
Create ids for associated type declarations and values
pub fn extract_ids( &mut self, program: &Program, raw_ids: &[RawId], ) -> Result<(), RustIrError>
pub fn lower( self, program: &Program, raw_ids: &[RawId], ) -> Result<LoweredProgram, RustIrError>
Trait Implementations§
source§impl Default for ProgramLowerer
impl Default for ProgramLowerer
source§fn default() -> ProgramLowerer
fn default() -> ProgramLowerer
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ProgramLowerer
impl RefUnwindSafe for ProgramLowerer
impl Send for ProgramLowerer
impl Sync for ProgramLowerer
impl Unpin for ProgramLowerer
impl UnwindSafe for ProgramLowerer
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> Cast for T
impl<T> Cast for T
source§fn cast<U>(self, interner: <U as HasInterner>::Interner) -> Uwhere
Self: CastTo<U>,
U: HasInterner,
fn cast<U>(self, interner: <U as HasInterner>::Interner) -> Uwhere
Self: CastTo<U>,
U: HasInterner,
Cast a value to type
U
using CastTo
.