Skip to content

Commit b8b047f

Browse files
committed
Auto merge of #126068 - lqd:revert-124976, r=petrochenkov
Revert "use `tcx.used_crates(())` more" before it reaches beta There are more open issues caused by #124976 than will be fixed by #125493 alone. The beta cut is soon, so let's revert it and buy some time to analyze and fix these issues in our own time. fixes rust-lang/rust#125474 fixes rust-lang/rust#125484 fixes rust-lang/rust#125646 fixes rust-lang/rust#125707 fixes #126066 fixes #125934 fixes rust-lang/rust#126021 r? `@petrochenkov` `@bors` p=1
2 parents 23c2c7f + fc696ea commit b8b047f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/helpers.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ fn try_resolve_did(tcx: TyCtxt<'_>, path: &[&str], namespace: Option<Namespace>)
126126
// the one in the sysroot and the one locally built by `cargo test`.)
127127
// FIXME: can we prefer the one from the sysroot?
128128
'crates: for krate in
129-
tcx.used_crates(()).iter().filter(|&&krate| tcx.crate_name(krate).as_str() == crate_name)
129+
tcx.crates(()).iter().filter(|&&krate| tcx.crate_name(krate).as_str() == crate_name)
130130
{
131131
let mut cur_item = DefId { krate: *krate, index: CRATE_DEF_INDEX };
132132
// Go over the modules.
@@ -1364,7 +1364,7 @@ pub fn get_local_crates(tcx: TyCtxt<'_>) -> Vec<CrateNum> {
13641364
.map(|crates| crates.split(',').map(|krate| krate.to_string()).collect::<Vec<_>>())
13651365
.unwrap_or_default();
13661366
let mut local_crates = Vec::new();
1367-
for &crate_num in tcx.crates_including_speculative(()) {
1367+
for &crate_num in tcx.crates(()) {
13681368
let name = tcx.crate_name(crate_num);
13691369
let name = name.as_str();
13701370
if local_crate_names.iter().any(|local_name| local_name == name) {

0 commit comments

Comments
 (0)