mozilla/rust — pull request #14938 by japaric (2014-06-16 18:44:46+00:00)
Title: Reexport `num_cpus` in `std::os`. Closes #14707

I'm not too confident about my approach regarding the handling of the docs, so here goes my train of thought:

The first commit does the reexport. But the side effect is that two `num_cpus` entries appear in the docs: `std::os::num_cpus` and `std::rt::num_cpus`, but we only need the former one.

The second commit deals with the duplicated entry. Is my first time using `rustdoc`, but I expected that a `#[doc(hidden)]` attribute on the `pub use self::util::num_cpus` would remove the duplicated entry - this didn't work and *this seems like a bug to me* (or it could be my inexperience with `rustdoc`). The only way I found to remove the duplicated entry was to make the `util` module public (this may not be acceptable), in addition to the `#[doc(hidden)]` attribute.

The third commit makes sure that other docs are kept intact (i.e. that the `std::rt::util` module doesn't appear in the docs).

cc @brson who requested the reexport, and @alexcrichton, who has been working on rustdoc lately.