Skip to content

Commit a309a52

Browse files
committed
Load metadata for dependencies of proc macro crates
1 parent f182c4a commit a309a52

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/librustc_metadata/creader.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -558,9 +558,10 @@ impl<'a> CrateLoader<'a> {
558558
dep_kind: DepKind,
559559
) -> CrateNumMap {
560560
debug!("resolving deps of external crate");
561-
if crate_root.is_proc_macro_crate() {
562-
return CrateNumMap::new();
563-
}
561+
562+
// Note that we need to resolve deps for proc-macro crates (just like normal crates)
563+
// since we may need to decode `Span`s that reference the `CrateNums`
564+
// of transitive dependencies
564565

565566
// The map from crate numbers in the crate we're resolving to local crate numbers.
566567
// We map 0 and all other holes in the map to our parent crate. The "additional"

0 commit comments

Comments
 (0)