about summary refs log tree commit diff
path: root/src/librustdoc/scrape_examples.rs
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2024-05-10 17:29:02 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2024-05-22 18:02:51 +0300
commit711338bd9f957b7bd345323033e9037c0e1ca535 (patch)
tree3ad83bd2c7bcee007c49752f517483e77eb53856 /src/librustdoc/scrape_examples.rs
parentf0038a7c8fd8b5b8a949c92ae6419bcb59a09e72 (diff)
downloadrust-711338bd9f957b7bd345323033e9037c0e1ca535.tar.gz
rust-711338bd9f957b7bd345323033e9037c0e1ca535.zip
rustc: Use `tcx.used_crates(())` more
And explain when it should be used.
Diffstat (limited to 'src/librustdoc/scrape_examples.rs')
-rw-r--r--src/librustdoc/scrape_examples.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/scrape_examples.rs b/src/librustdoc/scrape_examples.rs
index 9c9b386edda..19b0e045f04 100644
--- a/src/librustdoc/scrape_examples.rs
+++ b/src/librustdoc/scrape_examples.rs
@@ -283,7 +283,7 @@ pub(crate) fn run(
         // Collect CrateIds corresponding to provided target crates
         // If two different versions of the crate in the dependency tree, then examples will be collected from both.
         let all_crates = tcx
-            .crates(())
+            .crates_including_speculative(())
             .iter()
             .chain([&LOCAL_CRATE])
             .map(|crate_num| (crate_num, tcx.crate_name(*crate_num)))