Skip to content
Permalink
Browse files

metadata: Do not pass crate name after renaming to `register_crate`

It's entirely irrelevant to crate loading
  • Loading branch information...
petrochenkov committed Sep 29, 2019
1 parent b507971 commit acd102aebf82718d79b215b354d002d1be74090d
Showing with 3 additions and 5 deletions.
  1. +3 −5 src/librustc_metadata/creader.rs
@@ -191,7 +191,6 @@ impl<'a> CrateLoader<'a> {
&mut self,
host_lib: Option<Library>,
root: &Option<CratePaths>,
ident: Symbol,
span: Span,
lib: Library,
dep_kind: DepKind,
@@ -204,16 +203,15 @@ impl<'a> CrateLoader<'a> {
.map(|e| e.is_private_dep)
.unwrap_or(false);

info!("register crate `extern crate {} as {}` (private_dep = {})",
crate_root.name, ident, private_dep);
info!("register crate `{}` (private_dep = {})", crate_root.name, private_dep);

// Claim this crate number and cache it
let cnum = self.cstore.alloc_new_crate_num();

// Stash paths for top-most crate locally if necessary.
let crate_paths = if root.is_none() {
Some(CratePaths {
ident: ident.to_string(),
ident: crate_root.name.to_string(),
dylib: lib.dylib.clone().map(|p| p.0),
rlib: lib.rlib.clone().map(|p| p.0),
rmeta: lib.rmeta.clone().map(|p| p.0),
@@ -391,7 +389,7 @@ impl<'a> CrateLoader<'a> {
Ok((cnum, data))
}
(LoadResult::Loaded(library), host_library) => {
Ok(self.register_crate(host_library, root, ident, span, library, dep_kind, name))
Ok(self.register_crate(host_library, root, span, library, dep_kind, name))
}
_ => panic!()
}

0 comments on commit acd102a

Please sign in to comment.
You can’t perform that action at this time.