pub fn import_def(
        &self,
        scope: ScopeRef,
        name: Spanned<ResolvableName>,
        def: Def,
    ) -> Result<()> {
        self.with_scope(scope, |scope| {
            scope
                .imported_defs
                .entry(name.value)
                .or_insert_with(|| Vec::new())
                .push(Spanned::new(def, name.span));
            Ok(())
        })
    }
/// Import a definition into a scope.
Import a definition into a scope.
Import a definition into a scope .
pub fn import_def(
        &self,
        scope: ScopeRef,
        name: Spanned<ResolvableName>,
        def: Def,
    ) -> Result<()> {
        self.with_scope(scope, |scope| {
            scope
                .imported_defs
                .entry(name.value)
                .or_insert_with(|| Vec::new())
                .push(Spanned::new(def, name.span));
            Ok(())
        })
    }
pub fn import_def ( & self , scope : ScopeRef , name : Spanned < ResolvableName > , def : Def , ) -> Result < ( ) > { self . with_scope ( scope , | scope | { scope . imported_defs . entry ( name . value ) . or_insert_with ( | | Vec :: new ( ) ) . push ( Spanned :: new ( def , name . span ) ) ; Ok ( ( ) ) } ) }
Import a definition into a scope.
Import a definition into a scope .
&self
scope
ScopeRef
name
Spanned<ResolvableName>
def
Def
&self
scope
ScopeRef
name
Spanned<ResolvableName>
def
Def