about summary refs log tree commit diff
path: root/src/bootstrap/metadata.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/bootstrap/metadata.rs')
-rw-r--r--src/bootstrap/metadata.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/bootstrap/metadata.rs b/src/bootstrap/metadata.rs
index 59dc50be47f..e193e70a0c4 100644
--- a/src/bootstrap/metadata.rs
+++ b/src/bootstrap/metadata.rs
@@ -49,7 +49,11 @@ pub fn build(build: &mut Build) {
                 .filter(|dep| dep.source.is_none())
                 .map(|dep| INTERNER.intern_string(dep.name))
                 .collect();
-            build.crates.insert(name, Crate { name, deps, path });
+            let krate = Crate { name, deps, path };
+            let relative_path = krate.local_path(build);
+            build.crates.insert(name, krate);
+            let existing_path = build.crate_paths.insert(relative_path, name);
+            assert!(existing_path.is_none(), "multiple crates with the same path");
         }
     }
 }