Skip to content

Commit 2cd3d1f

Browse files
committed
Don't try to look up crate modules in ext_map in resolve
Closes #1305
1 parent dde5860 commit 2cd3d1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/comp/middle/resolve.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ fn unresolved_err(e: env, cx: ctxt, sp: span, name: ident, kind: str) {
613613
let did = def_id_of_def(def);
614614
if did.crate == ast::local_crate {
615615
path = e.mod_map.get(did.node).path + path;
616-
} else {
616+
} else if did.node != -1 {
617617
let paths = e.ext_map.get(did);
618618
if vec::len(paths) > 0u {
619619
path = str::connect(paths, "::") + "::" + path;

0 commit comments

Comments
 (0)