Auto merge of #44420 - alexcrichton:private-cstore, r=michaelwoerister
rustc: Make `CrateStore` private to `TyCtxt` This commit makes the `CrateStore` object private to the `ty/context.rs` module and also absent on the `Session` itself. cc #44390 cc #44341 (initial commit pulled and rebased from here)
This commit is contained in:
commit
c3eccc694c
26 changed files with 194 additions and 135 deletions
|
|
@ -60,7 +60,7 @@ fn basic_sess(sysroot: PathBuf) -> (Session, Rc<CStore>) {
|
|||
let descriptions = Registry::new(&rustc::DIAGNOSTICS);
|
||||
let dep_graph = DepGraph::new(opts.build_dep_graph());
|
||||
let cstore = Rc::new(CStore::new(Box::new(rustc_trans::LlvmMetadataLoader)));
|
||||
let sess = build_session(opts, &dep_graph, None, descriptions, cstore.clone());
|
||||
let sess = build_session(opts, &dep_graph, None, descriptions);
|
||||
rustc_trans::init(&sess);
|
||||
rustc_lint::register_builtins(&mut sess.lint_store.borrow_mut(), Some(&sess));
|
||||
(sess, cstore)
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ extern crate rustc_driver;
|
|||
extern crate syntax;
|
||||
extern crate rustc_errors as errors;
|
||||
|
||||
use rustc::middle::cstore::CrateStore;
|
||||
use rustc::session::Session;
|
||||
use rustc::session::config::{self, Input};
|
||||
use rustc_driver::{driver, CompilerCalls, Compilation};
|
||||
|
|
@ -47,6 +48,7 @@ impl<'a> CompilerCalls<'a> for TestCalls {
|
|||
fn late_callback(&mut self,
|
||||
_: &getopts::Matches,
|
||||
_: &Session,
|
||||
_: &CrateStore,
|
||||
_: &Input,
|
||||
_: &Option<PathBuf>,
|
||||
_: &Option<PathBuf>)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue