fn import_dummy_binding(&self, source_module: Module<'b>, directive: &'b ImportDirective<'b>) {
        if let SingleImport { target, .. } = directive.subclass {
            let dummy_binding = self.resolver.arenas.alloc_name_binding(NameBinding {
                kind: NameBindingKind::Def(Def::Err),
                span: DUMMY_SP,
                vis: ty::Visibility::Public,
            });
            let dummy_binding = directive.import(dummy_binding, None);

            let _ = source_module.try_define_child(target, ValueNS, dummy_binding.clone());
            let _ = source_module.try_define_child(target, TypeNS, dummy_binding);
        }
    }
// Define a "dummy" resolution containing a Def::Err as a placeholder for a
// failed resolution
Define a "dummy" resolution containing a Def::Err as a placeholder for a
failed resolution
Define a " dummy " resolution containing a Def :: Err as a placeholder for a failed resolution
fn import_dummy_binding(&self, source_module: Module<'b>, directive: &'b ImportDirective<'b>) {
        if let SingleImport { target, .. } = directive.subclass {
            let dummy_binding = self.resolver.arenas.alloc_name_binding(NameBinding {
                kind: NameBindingKind::Def(Def::Err),
                span: DUMMY_SP,
                vis: ty::Visibility::Public,
            });
            let dummy_binding = directive.import(dummy_binding, None);
            let _ = source_module.try_define_child(target, ValueNS, dummy_binding.clone());
            let _ = source_module.try_define_child(target, TypeNS, dummy_binding);
        }
    }
fn import_dummy_binding ( & self , source_module : Module < ' b > , directive : & ' b ImportDirective < ' b > ) { if let SingleImport { target , .. } = directive . subclass { let dummy_binding = self . resolver . arenas . alloc_name_binding ( NameBinding { kind : NameBindingKind :: Def ( Def :: Err ) , span : DUMMY_SP , vis : ty :: Visibility :: Public , } ) ; let dummy_binding = directive . import ( dummy_binding , None ) ; let _ = source_module . try_define_child ( target , ValueNS , dummy_binding . clone ( ) ) ; let _ = source_module . try_define_child ( target , TypeNS , dummy_binding ) ; } }
Define a "dummy" resolution containing a Def::Err as a placeholder for a
failed resolution
Define a " dummy " resolution containing a Def :: Err as a placeholder for a failed resolution
&self
source_module
Module<'b>
directive
&'b ImportDirective<'b>
&self
source_module
Module<'b>
directive
&'b ImportDirective<'b>