Revert "Rollup merge of #124976 - petrochenkov:usedcrates, r=oli-obk"

This reverts commit eda4a35f36, reversing
changes made to eb6b35b5bc.
This commit is contained in:
Rémy Rakic 2024-06-06 09:45:50 +00:00
parent 38de6e1f3a
commit c245cde61c

View File

@ -647,7 +647,7 @@ fn item_children_by_name(tcx: TyCtxt<'_>, def_id: DefId, name: Symbol) -> Vec<Re
/// This function is expensive and should be used sparingly.
pub fn def_path_res(cx: &LateContext<'_>, path: &[&str]) -> Vec<Res> {
fn find_crates(tcx: TyCtxt<'_>, name: Symbol) -> impl Iterator<Item = DefId> + '_ {
tcx.crates_including_speculative(())
tcx.crates(())
.iter()
.copied()
.filter(move |&num| tcx.crate_name(num) == name)