Rollup merge of #111870 - WaffleLapkin:just_🌟traits🌟_query, r=compiler-errors
Rename `traits_in_crate` query to `traits` > NOTE: Not named just `traits` due to a naming conflict. This can, in fact, be easily avoided.
This commit is contained in:
commit
783bea940b
4 changed files with 15 additions and 13 deletions
|
@ -323,7 +323,7 @@ provide! { tcx, def_id, other, cdata,
|
|||
|
||||
extra_filename => { cdata.root.extra_filename.clone() }
|
||||
|
||||
traits_in_crate => { tcx.arena.alloc_from_iter(cdata.get_traits()) }
|
||||
traits => { tcx.arena.alloc_from_iter(cdata.get_traits()) }
|
||||
trait_impls_in_crate => { tcx.arena.alloc_from_iter(cdata.get_trait_impls()) }
|
||||
implementations_of_trait => { cdata.get_implementations_of_trait(tcx, other) }
|
||||
crate_incoherent_impls => { cdata.get_incoherent_impls(tcx, other) }
|
||||
|
|
|
@ -1938,7 +1938,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
|
|||
|
||||
fn encode_traits(&mut self) -> LazyArray<DefIndex> {
|
||||
empty_proc_macro!(self);
|
||||
self.lazy_array(self.tcx.traits_in_crate(LOCAL_CRATE).iter().map(|def_id| def_id.index))
|
||||
self.lazy_array(self.tcx.traits(LOCAL_CRATE).iter().map(|def_id| def_id.index))
|
||||
}
|
||||
|
||||
/// Encodes an index, mapping each trait to its (local) implementations.
|
||||
|
@ -2329,7 +2329,7 @@ pub fn provide(providers: &mut Providers) {
|
|||
.get(&def_id)
|
||||
.expect("no traits in scope for a doc link")
|
||||
},
|
||||
traits_in_crate: |tcx, LocalCrate| {
|
||||
traits: |tcx, LocalCrate| {
|
||||
let mut traits = Vec::new();
|
||||
for id in tcx.hir().items() {
|
||||
if matches!(tcx.def_kind(id.owner_id), DefKind::Trait | DefKind::TraitAlias) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue