diff options
| author | Noratrieb <48135649+Noratrieb@users.noreply.github.com> | 2025-07-28 20:47:01 +0200 |
|---|---|---|
| committer | Noratrieb <48135649+Noratrieb@users.noreply.github.com> | 2025-07-28 20:53:01 +0200 |
| commit | 327ee15959949c808da2498f7337a5fa5e415c08 (patch) | |
| tree | c4242650834a7de2e5271eefdd4a3f66a77bae09 /src/librustdoc/scrape_examples.rs | |
| parent | f32b23204a0efe2fe8383ed4be1a30b56c1bbf94 (diff) | |
| download | rust-327ee15959949c808da2498f7337a5fa5e415c08.tar.gz rust-327ee15959949c808da2498f7337a5fa5e415c08.zip | |
Ensure external paths passed via flags end up in rustdoc depinfo
rustdoc has many flags to pass external HTML/Markdown/CSS files that end up in the build. These need to be recorded in depinfo so that Cargo will rebuild the crate if they change.
Diffstat (limited to 'src/librustdoc/scrape_examples.rs')
| -rw-r--r-- | src/librustdoc/scrape_examples.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/librustdoc/scrape_examples.rs b/src/librustdoc/scrape_examples.rs index fceacb69fb5..4d29c74e1eb 100644 --- a/src/librustdoc/scrape_examples.rs +++ b/src/librustdoc/scrape_examples.rs @@ -333,9 +333,11 @@ pub(crate) fn run( pub(crate) fn load_call_locations( with_examples: Vec<String>, dcx: DiagCtxtHandle<'_>, + loaded_paths: &mut Vec<PathBuf>, ) -> AllCallLocations { let mut all_calls: AllCallLocations = FxIndexMap::default(); for path in with_examples { + loaded_paths.push(path.clone().into()); let bytes = match fs::read(&path) { Ok(bytes) => bytes, Err(e) => dcx.fatal(format!("failed to load examples: {e}")), |
