Return Err() if resolve() is called before modules are set up

This commit is contained in:
Manish Goregaokar 2018-01-24 15:54:45 +05:30
parent f7ba00c636
commit 6b26b7472b

View file

@ -904,9 +904,7 @@ fn resolve(cx: &DocContext, path_str: &str, is_val: bool) -> Result<hir::Path, (
&path_str, is_val)
})
} else {
// FIXME(Manishearth) this branch doesn't seem to ever be hit, really
cx.resolver.borrow_mut()
.resolve_str_path_error(DUMMY_SP, &path_str, is_val)
Err(())
}
}