pub(crate) fn insert_mod(
        &self,
        items: &Items,
        source_id: SourceId,
        span: Span,
        parent: &Arc<CompileMod>,
        visibility: Visibility,
    ) -> Result<Arc<CompileMod>, QueryError> {
        let mut inner = self.inner.borrow_mut();

        let item = inner.insert_new_item(items, source_id, span, parent, visibility)?;

        let query_mod = Arc::new(CompileMod {
            location: Location::new(source_id, span),
            item: item.item.clone(),
            visibility,
            parent: Some(parent.clone()),
        });

        inner.modules.insert(item.item.clone(), query_mod.clone());
        inner.insert_name(&item.item);
        Ok(query_mod)
    }
/// Insert module and associated metadata.
Insert module and associated metadata.
Insert module and associated metadata .
pub(crate) fn insert_mod(
        &self,
        items: &Items,
        source_id: SourceId,
        span: Span,
        parent: &Arc<CompileMod>,
        visibility: Visibility,
    ) -> Result<Arc<CompileMod>, QueryError> {
        let mut inner = self.inner.borrow_mut();
        let item = inner.insert_new_item(items, source_id, span, parent, visibility)?;
        let query_mod = Arc::new(CompileMod {
            location: Location::new(source_id, span),
            item: item.item.clone(),
            visibility,
            parent: Some(parent.clone()),
        });
        inner.modules.insert(item.item.clone(), query_mod.clone());
        inner.insert_name(&item.item);
        Ok(query_mod)
    }
pub ( crate ) fn insert_mod ( & self , items : & Items , source_id : SourceId , span : Span , parent : & Arc < CompileMod > , visibility : Visibility , ) -> Result < Arc < CompileMod > , QueryError > { let mut inner = self . inner . borrow_mut ( ) ; let item = inner . insert_new_item ( items , source_id , span , parent , visibility ) ? ; let query_mod = Arc :: new ( CompileMod { location : Location :: new ( source_id , span ) , item : item . item . clone ( ) , visibility , parent : Some ( parent . clone ( ) ) , } ) ; inner . modules . insert ( item . item . clone ( ) , query_mod . clone ( ) ) ; inner . insert_name ( & item . item ) ; Ok ( query_mod ) }
Insert module and associated metadata.
Insert module and associated metadata .
&self
items
&Items
source_id
SourceId
span
Span
parent
&Arc<CompileMod>
visibility
Visibility
&self
items
&Items
source_id
SourceId
span
Span
parent
&Arc<CompileMod>
visibility
Visibility