// Traverses an AST, reading all the information about use'd crates and
// extern libraries necessary for later resolving, typechecking, linking,
// etc.
Traverses an AST, reading all the information about use'd crates and
extern libraries necessary for later resolving, typechecking, linking,
etc.
Traverses an AST reading all the information about use ' d crates and extern libraries necessary for later resolving typechecking linking etc .
pub fn read_crates(&mut self, krate: &hir::Crate) {
        self.process_crate(krate);
        visit::walk_crate(self, krate);
        self.creader.inject_allocator_crate();
        if log_enabled!(log::INFO) {
            dump_crates(&self.sess.cstore);
        }
        for &(ref name, kind) in &self.sess.opts.libs {
            register_native_lib(self.sess, None, name.clone(), kind);
        }
        self.creader.register_statically_included_foreign_items();
    }
pub fn read_crates ( & mut self , krate : & hir :: Crate ) { self . process_crate ( krate ) ; visit :: walk_crate ( self , krate ) ; self . creader . inject_allocator_crate ( ) ; if log_enabled ! ( log INFO ) { dump_crates ( & self . sess . cstore ) ; } for & ( ref name , kind ) in & self . sess . opts . libs { register_native_lib ( self . sess , None , name . clone ( ) , kind ) ; } self . creader . register_statically_included_foreign_items ( ) ; }
Traverses an AST, reading all the information about use'd crates and
extern libraries necessary for later resolving, typechecking, linking,
etc.
Traverses an AST reading all the information about use ' d crates and extern libraries necessary for later resolving typechecking linking etc .
&mut self
krate
&hir::Crate