about summary refs log tree commit diff
path: root/src/test/rustdoc-ui/coverage/traits.rs
diff options
context:
space:
mode:
authorJoshua Nelson <jyn514@gmail.com>2021-04-09 09:00:12 -0400
committerJoshua Nelson <jyn514@gmail.com>2021-04-09 09:09:19 -0400
commit40ca3521ad1b0b42980ff16d5b9d1d3d8b68a50e (patch)
tree7ed03f2cbf3e64dc0d6bf1e91721f533d23867cd /src/test/rustdoc-ui/coverage/traits.rs
parent69e1d22ddbc67b25141a735a22a8895a678b32ca (diff)
downloadrust-40ca3521ad1b0b42980ff16d5b9d1d3d8b68a50e.tar.gz
rust-40ca3521ad1b0b42980ff16d5b9d1d3d8b68a50e.zip
rustdoc: Don't generate blanket impls when running --show-coverage
get_blanket_impls is the slowest part of rustdoc, and the coverage pass
completely ignores blanket impls. This stops running it at all, and also
removes some unnecessary checks in `calculate_doc_coverage` that ignored
the impl anyway.

We don't currently measure --show-coverage in perf.rlo, but I tested
this locally on cargo and it brought the time down from 2.9 to 1.6
seconds.
Diffstat (limited to 'src/test/rustdoc-ui/coverage/traits.rs')
-rw-r--r--src/test/rustdoc-ui/coverage/traits.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/test/rustdoc-ui/coverage/traits.rs b/src/test/rustdoc-ui/coverage/traits.rs
index 7d5cf049e7f..2bcb50aea77 100644
--- a/src/test/rustdoc-ui/coverage/traits.rs
+++ b/src/test/rustdoc-ui/coverage/traits.rs
@@ -16,6 +16,7 @@ pub trait ThisTrait {
 }
 
 /// so what happens if we take some struct...
+#[derive(Clone)]
 pub struct SomeStruct;
 
 /// ...and slap this trait on it?