Skip to content

Commit e6469ae

Browse files
committed
Avoid redundant lookup in CrateLoader::existing_match
1 parent 1b0bc59 commit e6469ae

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
@@ -533,7 +533,7 @@ impl<'a, 'tcx> CrateLoader<'a, 'tcx> {
533533
// We're also sure to compare *paths*, not actual byte slices. The
534534
// `source` stores paths which are normalized which may be different
535535
// from the strings on the command line.
536-
let source = self.cstore.get_crate_data(cnum).cdata.source();
536+
let source = data.source();
537537
if let Some(entry) = self.sess.opts.externs.get(name.as_str()) {
538538
// Only use `--extern crate_name=path` here, not `--extern crate_name`.
539539
if let Some(mut files) = entry.files() {

0 commit comments

Comments
 (0)