How to hide `automatically generated` documentation items
bradbell:
> a huge number of items below `Auto Trait Implementations` and `Blanket Implementations` . How to I suppress these automatically generate items
first of all, these sections are placed at the last position, after the manual trait `impl`s, in order to make them less intrusive. auto traits are all one-liners because they are marker traits, and the blanket `impl`s are wrapped in `<details>` html tags and collapsed on load, so I don't think suppressing these sections makes a significant difference in terms of readability.
but if you insist, you can use css to hide them, it's just html after all. (I don't think you can prevent `rustdoc` from generating them, though).
there's an `--extend-css` command line option for this. this will append the custom css to all the theme css files. alternatively, you can also use a custom theme (with the `--theme` command line option), instead of modifying the existing ones, so you can toggle the visibility by simply switching themes.
however, the format of `rustdoc` output is undocumented, the relevant `id` and `class` of the html elements can only be found in the source code.
for example, the section of auto trait implementations and blanket implementations are rendered here:
github.com/rust-lang/rust
#### src/librustdoc/html/render/mod.rs
`8a407a828`
1292. if !synthetic.is_empty() {
1293. write!(
1294. w,
1295. "{}<div id=\"synthetic-implementations-list\">",
1296. write_impl_section_heading("Auto Trait Implementations", "synthetic-implementations",)
1297. )
1298. .unwrap();
1299. render_impls(cx, &mut w, synthetic, containing_item, false);
1300. w.write_str("</div>").unwrap();
1301. }
1302.
1303. if !blanket_impl.is_empty() {
1304. write!(
1305. w,
1306. "{}<div id=\"blanket-implementations-list\">",
1307. write_impl_section_heading("Blanket Implementations", "blanket-implementations")
1308. )
1309. .unwrap();
1310. render_impls(cx, &mut w, blanket_impl, containing_item, false);
1311. w.write_str("</div>").unwrap();
1312. }