RawVec and Unique are used internally in the implementation of, for example, Vec. They would be tremendously useful for implementing other container structures. As far as I can see from the liballoc source on GitHub, they are exported by their respective modules and can be imported also in user code (not just Rust developer code). The documentation, however, is explicitly hidden using #![doc(hidden)]. I'd like to understand the rationale.
The PR that made raw_vec public has the rationale: https://github.com/rust-lang/rust/pull/51569
Thanks. That's a bit over my head. Do I read it right that the reason is that it's unstable and likely to stay that way semi-permanently, so people shouldn't be encouraged to use it?
If it isn't documented, don't use it.
#[doc(hidden)] is a tool for making things effectively private, in cases where they must be public only for technical reasons (e.g. if macros use them). I wouldn't consider these stability annotations to have any bearing at all on whether they can be used forward-compatibly by downstream code.