Queryify is_doc_hidden

It came up hot on some profiling of rustdoc I did, so hopefully turning
it into a query will help.
This commit is contained in:
Noah Lev 2022-03-12 14:27:51 -08:00
parent ed2a69c4a9
commit f39d0fc100
3 changed files with 17 additions and 12 deletions

View file

@ -1035,6 +1035,11 @@ rustc_queries! {
separate_provide_extern
}
/// Determines whether an item is annotated with `doc(hidden)`.
query is_doc_hidden(def_id: DefId) -> bool {
desc { |tcx| "checking whether `{}` is `doc(hidden)`", tcx.def_path_str(def_id) }
}
query item_attrs(def_id: DefId) -> &'tcx [ast::Attribute] {
desc { |tcx| "collecting attributes of `{}`", tcx.def_path_str(def_id) }
separate_provide_extern