about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src/coverage/debug.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-12-25 14:47:12 +0000
committerbors <bors@rust-lang.org>2021-12-25 14:47:12 +0000
commitc096176fb411c90a8b0226901c11e7edd131192f (patch)
tree1a0c79a7cd1f22621a97c69149a7feb04818b6ab /compiler/rustc_mir_transform/src/coverage/debug.rs
parent67491a22dbafc275b1549c31876c1fd356bd51cc (diff)
parent0ec3199b0aafd9a486d4dd8dda39479536aa6934 (diff)
downloadrust-c096176fb411c90a8b0226901c11e7edd131192f.tar.gz
rust-c096176fb411c90a8b0226901c11e7edd131192f.zip
Auto merge of #92227 - Kobzol:rustdoc-doc-hidden, r=jyn514
Rustdoc: use `is_doc_hidden` method on more places

While profiling `rustdoc`, I noticed that finding out if some item is marked with `#[doc(hidden)]` is relatively hot, so I tried to optimize it.

I noticed that there is already a method called `is_doc_hidden` on `TyCtxt`, but it wasn't used much, so I replaced the manual calls to `attrs(...).has_word(...)` with this method. Just by doing that, perf. was improved locally, although I'm not sure if the semantics of the previous calls and this method are the same?

As another step, I tried to querify `is_doc_hidden`, but I didn't include that here until we see the perf. results from the first commit and until I find whether this change is OK at all :)

Can I ask for a perf. run? Thanks.

r? `@jyn514`
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/debug.rs')
0 files changed, 0 insertions, 0 deletions