Rust-doc-is-too-verbose: Collapses macro-generated const generics-like or variadic generics-like items in docs

Hi!
I've made a WebExtension called 'rust-doc-is-too-verbose'. It collapses macro generated const generics-like or variadic generics-like items in rust documents such as:

  • (A, ), (A, B, ), (A, B, C, ), ...
  • <A>, <A, B>, <A, B, C>, ...
  • [T; 1], [T; 2], [T; 3], ...

As you know, const generics and variadic generics are not stabilized. So many libraries cope with this situations with macros.

However, the generated items take huge portions of a vertical scroll. In extreme, about 80% of the contents are generated items. It is very distracting. So I've made it.

It parses impl items with parsimmon, and it collects similar items. Although the parser roughly parses common syntax, not full formal syntax of rust, it already does the job pretty good
(I also test parser coverages on standard libs for interesting-looking ones)

See screenshots. Before applying the plguin, std/primitive.tuple.html is 17671 pixels long and, but after applying it, it is reduced to 3611 pixels long.

Left: before, rigit: after

more scrrenshots: Rust doc is too verbose - Album on Imgur

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.