Description
There's a lot of implicit stuff going on behind the scenes in Rust that's dictated by the very nature of the trait-based type systems. However, that doesn't change the fact that hidden complexity makes it difficult to understand other people's code and write your own, let alone learn the language for newbies.
One example of such complexity is side effects of importing traits from other modules, when seemingly familiar types can suddenly acquire new methods and even operational semantics. But since we can declare the use of elements without naming each of them individually, with asterisk wildcard syntax, these methods begin to look like as though they came out of nowhere. And sometimes this approach is even preferable and officially recommended - see e.g. std::io::prelude
.
This problem could be greatly mitigated if such traits were distinctly marked out on overview pages. This includes:
- Traits that have blanket implementations. The most prominent example here is
Any
. - Traits that have implementations on foreign types, along with generic (i.e. covered) ones. A good illustration of it is
zerocopy::Unaligned
. - Auto traits: as of 1.82.0, this is
Send
,Sync
,Unpin
,UnwindSafe
,RefUnwindSafe
,Freeze
(unstable) andSized
.
They don't quite fit the stated criterion, but are close to it in spirit, so I think it would be nice to also highlight them from the general mass.