Skip to content

Commit 94e48f9

Browse files
committed
Avoid redundant lookup in CrateLoader::existing_match
1 parent 0d95920 commit 94e48f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_metadata/src/creader.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ impl CStore {
511511
// We're also sure to compare *paths*, not actual byte slices. The
512512
// `source` stores paths which are normalized which may be different
513513
// from the strings on the command line.
514-
let source = self.get_crate_data(cnum).cdata.source();
514+
let source = data.source();
515515
if let Some(entry) = externs.get(name.as_str()) {
516516
// Only use `--extern crate_name=path` here, not `--extern crate_name`.
517517
if let Some(mut files) = entry.files() {

0 commit comments

Comments
 (0)