Skip to content

Commit 45d168a

Browse files
committed
metadata: Do not pass crate name after renaming to register_crate
It's entirely irrelevant to crate loading
1 parent c80ffcb commit 45d168a

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/librustc_metadata/creader.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ impl<'a> CrateLoader<'a> {
191191
&mut self,
192192
host_lib: Option<Library>,
193193
root: &Option<CratePaths>,
194-
ident: Symbol,
195194
span: Span,
196195
lib: Library,
197196
dep_kind: DepKind,
@@ -204,16 +203,15 @@ impl<'a> CrateLoader<'a> {
204203
.map(|e| e.is_private_dep)
205204
.unwrap_or(false);
206205

207-
info!("register crate `extern crate {} as {}` (private_dep = {})",
208-
crate_root.name, ident, private_dep);
206+
info!("register crate `{}` (private_dep = {})", crate_root.name, private_dep);
209207

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

213211
// Stash paths for top-most crate locally if necessary.
214212
let crate_paths = if root.is_none() {
215213
Some(CratePaths {
216-
ident: ident.to_string(),
214+
ident: crate_root.name.to_string(),
217215
dylib: lib.dylib.clone().map(|p| p.0),
218216
rlib: lib.rlib.clone().map(|p| p.0),
219217
rmeta: lib.rmeta.clone().map(|p| p.0),
@@ -391,7 +389,7 @@ impl<'a> CrateLoader<'a> {
391389
Ok((cnum, data))
392390
}
393391
(LoadResult::Loaded(library), host_library) => {
394-
Ok(self.register_crate(host_library, root, ident, span, library, dep_kind, name))
392+
Ok(self.register_crate(host_library, root, span, library, dep_kind, name))
395393
}
396394
_ => panic!()
397395
}

0 commit comments

Comments
 (0)