fn resolve_imports_in_current_module(&mut self, errors: &mut Vec<ImportResolvingError<'b>>) {
        let mut imports = Vec::new();
        let mut unresolved_imports = self.resolver.current_module.unresolved_imports.borrow_mut();
        ::std::mem::swap(&mut imports, &mut unresolved_imports);

        for import_directive in imports {
            match self.resolve_import(&import_directive) {
                Failed(err) => {
                    let (span, help) = match err {
                        Some((span, msg)) => (span, format!(". {}", msg)),
                        None => (import_directive.span, String::new()),
                    };
                    errors.push(ImportResolvingError {
                        source_module: self.resolver.current_module,
                        import_directive: import_directive,
                        span: span,
                        help: help,
                    });
                }
                Indeterminate => unresolved_imports.push(import_directive),
                Success(()) => {
                    // Decrement the count of unresolved imports.
                    assert!(self.resolver.unresolved_imports >= 1);
                    self.resolver.unresolved_imports -= 1;
                }
            }
        }
    }
/// Attempts to resolve imports for the given module only.
Attempts to resolve imports for the given module only.
Attempts to resolve imports for the given module only .
fn resolve_imports_in_current_module(&mut self, errors: &mut Vec<ImportResolvingError<'b>>) {
        let mut imports = Vec::new();
        let mut unresolved_imports = self.resolver.current_module.unresolved_imports.borrow_mut();
        ::std::mem::swap(&mut imports, &mut unresolved_imports);
        for import_directive in imports {
            match self.resolve_import(&import_directive) {
                Failed(err) => {
                    let (span, help) = match err {
                        Some((span, msg)) => (span, format!(". {}", msg)),
                        None => (import_directive.span, String::new()),
                    };
                    errors.push(ImportResolvingError {
                        source_module: self.resolver.current_module,
                        import_directive: import_directive,
                        span: span,
                        help: help,
                    });
                }
                Indeterminate => unresolved_imports.push(import_directive),
                Success(()) => {
                    // Decrement the count of unresolved imports.
                    assert!(self.resolver.unresolved_imports >= 1);
                    self.resolver.unresolved_imports -= 1;
                }
            }
        }
    }
fn resolve_imports_in_current_module ( & mut self , errors : & mut Vec < ImportResolvingError < ' b > > ) { let mut imports = Vec :: new ( ) ; let mut unresolved_imports = self . resolver . current_module . unresolved_imports . borrow_mut ( ) ; :: std :: mem :: swap ( & mut imports , & mut unresolved_imports ) ; for import_directive in imports { match self . resolve_import ( & import_directive ) { Failed ( err ) => { let ( span , help ) = match err { Some ( ( span , msg ) ) => ( span , format ! ( " " msg ) ) , None => ( import_directive . span , String :: new ( ) ) , } ; errors . push ( ImportResolvingError { source_module : self . resolver . current_module , import_directive : import_directive , span : span , help : help , } ) ; } Indeterminate => unresolved_imports . push ( import_directive ) , Success ( ( ) ) => { // Decrement the count of unresolved imports. assert ! ( self resolver unresolved_imports 1 ) ; self . resolver . unresolved_imports -= 1 ; } } } }
Attempts to resolve imports for the given module only.
Attempts to resolve imports for the given module only .
&mut self
errors
&mut Vec<ImportResolvingError<'b>>
&mut self
errors
&mut Vec<ImportResolvingError<'b>>