Restore colour to rustdoc

This not only gives back the colour to structs, traits, and functions, but also restores the long-lost colour to enums. I’ve run [`linkchecker`](http://wummel.github.io/linkchecker/) and there don’t seem to be any more invalid links than usual.
I’m not entirely sure if the way I’ve implemented this is very idiomatic or reliable, but it seems to work.

Closes #17131.
Closes #16712.
Closes #16711.
It’s the only method I tried that worked. If anyone has any better suggestions, I’d be happy to hear them, because I’m not very experienced with how the compiler works.