mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
Store boxed metadata loader in CrateLoader
This commit is contained in:
parent
ecc68e7879
commit
db4d8e2cab
@ -218,7 +218,7 @@ pub fn configure_and_expand(
|
||||
krate,
|
||||
&crate_name,
|
||||
&resolver_arenas,
|
||||
&*metadata_loader,
|
||||
metadata_loader,
|
||||
);
|
||||
let mut resolver = match res {
|
||||
Err(v) => {
|
||||
@ -350,7 +350,7 @@ fn configure_and_expand_inner<'a>(
|
||||
mut krate: ast::Crate,
|
||||
crate_name: &str,
|
||||
resolver_arenas: &'a ResolverArenas<'a>,
|
||||
metadata_loader: &'a MetadataLoaderDyn,
|
||||
metadata_loader: Box<MetadataLoaderDyn>,
|
||||
) -> Result<(ast::Crate, Resolver<'a>)> {
|
||||
tracing::trace!("configure_and_expand_inner");
|
||||
pre_expansion_lint(sess, lint_store, &krate, crate_name);
|
||||
|
@ -54,7 +54,7 @@ pub struct CStore {
|
||||
pub struct CrateLoader<'a> {
|
||||
// Immutable configuration.
|
||||
sess: &'a Session,
|
||||
metadata_loader: &'a MetadataLoaderDyn,
|
||||
metadata_loader: Box<MetadataLoaderDyn>,
|
||||
local_crate_name: Symbol,
|
||||
// Mutable output.
|
||||
cstore: CStore,
|
||||
@ -219,7 +219,7 @@ impl CStore {
|
||||
impl<'a> CrateLoader<'a> {
|
||||
pub fn new(
|
||||
sess: &'a Session,
|
||||
metadata_loader: &'a MetadataLoaderDyn,
|
||||
metadata_loader: Box<MetadataLoaderDyn>,
|
||||
local_crate_name: &str,
|
||||
) -> Self {
|
||||
let local_crate_stable_id =
|
||||
@ -544,7 +544,7 @@ impl<'a> CrateLoader<'a> {
|
||||
info!("falling back to a load");
|
||||
let mut locator = CrateLocator::new(
|
||||
self.sess,
|
||||
self.metadata_loader,
|
||||
&*self.metadata_loader,
|
||||
name,
|
||||
hash,
|
||||
host_hash,
|
||||
|
@ -1198,7 +1198,7 @@ impl<'a> Resolver<'a> {
|
||||
session: &'a Session,
|
||||
krate: &Crate,
|
||||
crate_name: &str,
|
||||
metadata_loader: &'a MetadataLoaderDyn,
|
||||
metadata_loader: Box<MetadataLoaderDyn>,
|
||||
arenas: &'a ResolverArenas<'a>,
|
||||
) -> Resolver<'a> {
|
||||
let root_local_def_id = LocalDefId { local_def_index: CRATE_DEF_INDEX };
|
||||
|
Loading…
Reference in New Issue
Block a user