I’ve been writing Rust in my spare time for a while now, and I’ve read the Rust Book and have done my battles with the borrow checker.
Despite all that I haven’t heard about the restricting features of the pub keyword. I just found out because it was used in a blog post without comment.
Specifically I’m talking about this feature: https://github.com/rust-lang/rfcs/blob/master/text/1422-pub-restricted.md
Why isn’t this feature documented in the book?
Are there other undocumented / not easily discoverable features that I haven’t heard of?
Relevant chapter of the book: https://doc.rust-lang.org/stable/book/ch07-02-modules-and-use-to-control-scope-and-privacy.html