about summary refs log tree commit diff
path: root/compiler/rustc_metadata
diff options
context:
space:
mode:
authorKornel <kornel@geekhood.net>2025-07-19 22:49:06 +0100
committerKornel <kornel@geekhood.net>2025-07-28 13:34:03 +0100
commite008fe0c1865e6f307c1e4e6260612837051cb8b (patch)
tree29e1d55d0e3ae124256dd72ae26d83ebf4111860 /compiler/rustc_metadata
parent65b6cdb6a6d33987b9d642a4882283c71fbe3957 (diff)
downloadrust-e008fe0c1865e6f307c1e4e6260612837051cb8b.tar.gz
rust-e008fe0c1865e6f307c1e4e6260612837051cb8b.zip
Avoid redundant lookup in CrateLoader::existing_match
Diffstat (limited to 'compiler/rustc_metadata')
-rw-r--r--compiler/rustc_metadata/src/creader.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_metadata/src/creader.rs b/compiler/rustc_metadata/src/creader.rs
index 438eff33054..6d3dab267ac 100644
--- a/compiler/rustc_metadata/src/creader.rs
+++ b/compiler/rustc_metadata/src/creader.rs
@@ -511,7 +511,7 @@ impl CStore {
             // We're also sure to compare *paths*, not actual byte slices. The
             // `source` stores paths which are normalized which may be different
             // from the strings on the command line.
-            let source = self.get_crate_data(cnum).cdata.source();
+            let source = data.source();
             if let Some(entry) = externs.get(name.as_str()) {
                 // Only use `--extern crate_name=path` here, not `--extern crate_name`.
                 if let Some(mut files) = entry.files() {