Skip to content

Commit 6e83f02

Browse files
committed
Auto merge of #125448 - matthiaskrgr:rollup-vn6nleh, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #124297 (Allow coercing functions whose signature differs in opaque types in their defining scope into a shared function pointer type) - #124516 (Allow monomorphization time const eval failures if the cause is a type layout issue) - #124976 (rustc: Use `tcx.used_crates(())` more) - #125210 (Cleanup: Fix up some diagnostics) - #125409 (Rename `FrameworkOnlyWindows` to `RawDylibOnlyWindows`) - #125416 (Use correct param-env in `MissingCopyImplementations`) - #125421 (Rewrite `core-no-oom-handling`, `issue-24445` and `issue-38237` `run-make` tests to new `rmake.rs` format) - #125438 (Remove unneeded string conversion) r? `@ghost` `@rustbot` modify labels: rollup
2 parents bd465c6 + e2ca1c3 commit 6e83f02

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/helpers.rs

+2-2
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.crates(()).iter().filter(|&&krate| tcx.crate_name(krate).as_str() == crate_name)
129+
tcx.used_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.
@@ -1365,7 +1365,7 @@ pub fn get_local_crates(tcx: TyCtxt<'_>) -> Vec<CrateNum> {
13651365
.map(|crates| crates.split(',').map(|krate| krate.to_string()).collect::<Vec<_>>())
13661366
.unwrap_or_default();
13671367
let mut local_crates = Vec::new();
1368-
for &crate_num in tcx.crates(()) {
1368+
for &crate_num in tcx.crates_including_speculative(()) {
13691369
let name = tcx.crate_name(crate_num);
13701370
let name = name.as_str();
13711371
if local_crate_names.iter().any(|local_name| local_name == name) {

0 commit comments

Comments
 (0)