Auto merge of #92690 - matthiaskrgr:rollup-rw0oz05, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #92055 (Add release notes for 1.58) - #92490 (Move crate drop-down to search results page) - #92510 (Don't resolve blocks in foreign functions) - #92573 (expand: Refactor InvocationCollector visitor for better code reuse) - #92608 (rustdoc: Introduce a resolver cache for sharing data between early doc link resolution and later passes) - #92657 (Implemented const casts of raw pointers) - #92671 (Make `Atomic*::from_mut` return `&mut Atomic*`) - #92673 (Remove useless collapse toggle on "all items" page) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
f7bb8e3677
31 changed files with 1367 additions and 884 deletions
|
@ -10,6 +10,7 @@ use rustc_hir::definitions::{DefKey, DefPath, DefPathHash};
|
|||
use rustc_middle::metadata::ModChild;
|
||||
use rustc_middle::middle::exported_symbols::ExportedSymbol;
|
||||
use rustc_middle::middle::stability::DeprecationEntry;
|
||||
use rustc_middle::ty::fast_reject::SimplifiedType;
|
||||
use rustc_middle::ty::query::{ExternProviders, Providers};
|
||||
use rustc_middle::ty::{self, TyCtxt, Visibility};
|
||||
use rustc_session::cstore::{CrateSource, CrateStore, ForeignModule};
|
||||
|
@ -187,8 +188,6 @@ provide! { <'tcx> tcx, def_id, other, cdata,
|
|||
extra_filename => { cdata.root.extra_filename.clone() }
|
||||
|
||||
traits_in_crate => { tcx.arena.alloc_from_iter(cdata.get_traits()) }
|
||||
all_trait_implementations => { tcx.arena.alloc_from_iter(cdata.get_trait_impls()) }
|
||||
|
||||
implementations_of_trait => { cdata.get_implementations_of_trait(tcx, other) }
|
||||
|
||||
visibility => { cdata.get_visibility(def_id.index) }
|
||||
|
@ -473,6 +472,17 @@ impl CStore {
|
|||
) -> Span {
|
||||
self.get_crate_data(cnum).get_proc_macro_quoted_span(id, sess)
|
||||
}
|
||||
|
||||
pub fn traits_in_crate_untracked(&self, cnum: CrateNum) -> Vec<DefId> {
|
||||
self.get_crate_data(cnum).get_traits().collect()
|
||||
}
|
||||
|
||||
pub fn trait_impls_in_crate_untracked(
|
||||
&self,
|
||||
cnum: CrateNum,
|
||||
) -> Vec<(DefId, Option<SimplifiedType>)> {
|
||||
self.get_crate_data(cnum).get_trait_impls().collect()
|
||||
}
|
||||
}
|
||||
|
||||
impl CrateStore for CStore {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue