pub(crate) fn insert_root_mod(
        &self,
        source_id: SourceId,
        spanned: Span,
    ) -> Result<Arc<CompileMod>, QueryError> {
        let mut inner = self.inner.borrow_mut();

        let query_mod = Arc::new(CompileMod {
            location: Location::new(source_id, spanned),
            item: Item::new(),
            visibility: Visibility::Public,
            parent: None,
        });

        inner.modules.insert(Item::new(), query_mod.clone());
        inner.insert_name(&Item::new());
        Ok(query_mod)
    }
/// Insert module and associated metadata.
Insert module and associated metadata.
Insert module and associated metadata .
pub(crate) fn insert_root_mod(
        &self,
        source_id: SourceId,
        spanned: Span,
    ) -> Result<Arc<CompileMod>, QueryError> {
        let mut inner = self.inner.borrow_mut();
        let query_mod = Arc::new(CompileMod {
            location: Location::new(source_id, spanned),
            item: Item::new(),
            visibility: Visibility::Public,
            parent: None,
        });
        inner.modules.insert(Item::new(), query_mod.clone());
        inner.insert_name(&Item::new());
        Ok(query_mod)
    }
pub ( crate ) fn insert_root_mod ( & self , source_id : SourceId , spanned : Span , ) -> Result < Arc < CompileMod > , QueryError > { let mut inner = self . inner . borrow_mut ( ) ; let query_mod = Arc :: new ( CompileMod { location : Location :: new ( source_id , spanned ) , item : Item :: new ( ) , visibility : Visibility :: Public , parent : None , } ) ; inner . modules . insert ( Item :: new ( ) , query_mod . clone ( ) ) ; inner . insert_name ( & Item :: new ( ) ) ; Ok ( query_mod ) }
Insert module and associated metadata.
Insert module and associated metadata .
&self
source_id
SourceId
spanned
Span
&self
source_id
SourceId
spanned
Span