rustc_metadata: Encode list of all crate's traits into metadata

This commit is contained in:
Vadim Petrochenkov 2021-12-24 11:09:32 +08:00
parent e91ad5fc62
commit 90e371027e
12 changed files with 96 additions and 113 deletions

View file

@ -1609,11 +1609,11 @@ rustc_queries! {
desc { "fetching all foreign CrateNum instances" }
}
/// A vector of every trait accessible in the whole crate
/// (i.e., including those from subcrates). This is used only for
/// error reporting.
query all_traits(_: ()) -> &'tcx [DefId] {
desc { "fetching all foreign and local traits" }
/// A list of all traits in a crate, used by rustdoc and error reporting.
/// NOTE: Not named just `traits` due to a naming conflict.
query traits_in_crate(_: CrateNum) -> &'tcx [DefId] {
desc { "fetching all traits in a crate" }
separate_provide_extern
}
/// The list of symbols exported from the given crate.