diff options
| author | Felix S. Klock II <pnkfelix@pnkfx.org> | 2022-03-03 18:45:25 -0500 |
|---|---|---|
| committer | Felix S. Klock II <pnkfelix@pnkfx.org> | 2022-03-03 18:45:25 -0500 |
| commit | b82795244e31ce1ad60bbb823c4e4b91f921c296 (patch) | |
| tree | d15cc8383c1abb95e6c577587732f352219545ef /compiler/rustc_expand/src/module.rs | |
| parent | e9035f7bef47c21b575af517dce309d96df4eb51 (diff) | |
| download | rust-b82795244e31ce1ad60bbb823c4e4b91f921c296.tar.gz rust-b82795244e31ce1ad60bbb823c4e4b91f921c296.zip | |
Associate multiple with a crate too.
Diffstat (limited to 'compiler/rustc_expand/src/module.rs')
| -rw-r--r-- | compiler/rustc_expand/src/module.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_expand/src/module.rs b/compiler/rustc_expand/src/module.rs index a584c69fa70..2a059f3519d 100644 --- a/compiler/rustc_expand/src/module.rs +++ b/compiler/rustc_expand/src/module.rs @@ -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( |
