Removing experimental and deprecated items

⚓ Rust    📅 2025-11-14    👤 surdeus    👁️ 5      

surdeus

Searching for hiding the experimental APIs I found this post where the solution is using uBlock.

Another simple solution is using stylus add on, and then the code below (one or the other).

Strangely, the docs have some elements have it within <summary>, some next to it.
I didn't look in detail.

Here this blocks most of the elements:

@-moz-document domain("doc.rust-lang.org") {
  details:has(summary > span.item-info > div.stab.deprecated),
  details:has(summary > span.item-info > div.stab.unstable),
    details:has(> span.item-info > div.stab.unstable),
    details:has(> span.item-info > div.stab.deprecated) {
        display: none
    }
}

A compact version (but I could be wrong) is:

@-moz-document domain("doc.rust-lang.org") {
    /* unsure whether this can be compressed further */
    details:has(:is(summary > span.item-info, span.item-info) > :is(div.stab.unstable, div.stab.deprecated)) {
        display: none
    }
}

but stylus formats it incorrectly so you shouldn't press beautify if you use it.

1 post - 1 participant

Read full topic

🏷️ Rust_feed