Associate multiple with a crate too.

This commit is contained in:
Felix S. Klock II 2022-03-03 18:45:25 -05:00
parent e9035f7bef
commit b82795244e
17 changed files with 28 additions and 27 deletions

View file

@ -28,7 +28,7 @@ pub struct ModulePathSuccess {
crate struct ParsedExternalMod {
pub items: Vec<P<Item>>,
pub inner_span: Span,
pub spans: ModSpans,
pub file_path: PathBuf,
pub dir_path: PathBuf,
pub dir_ownership: DirOwnership,
@ -69,13 +69,13 @@ crate fn parse_external_mod(
(items, inner_span, mp.file_path)
};
// (1) ...instead, we return a dummy module.
let (items, ModSpans { inner_span }, file_path) =
let (items, spans, file_path) =
result.map_err(|err| err.report(sess, span)).unwrap_or_default();
// Extract the directory path for submodules of the module.
let dir_path = file_path.parent().unwrap_or(&file_path).to_owned();
ParsedExternalMod { items, inner_span, file_path, dir_path, dir_ownership }
ParsedExternalMod { items, spans, file_path, dir_path, dir_ownership }
}
crate fn mod_dir_path(