rust/library/std/src
Guillaume Gomez e32328bdc5
Rollup merge of #89596 - GuillaumeGomez:implicit-doc-cfg, r=jyn514
Make cfg imply doc(cfg)

This is a reopening of #79341, rebased and modified a bit (we made a lot of refactoring in rustdoc's types so they needed to be reflected in this PR as well):

 * `hidden_cfg` is now in the `Cache` instead of `DocContext` because `cfg` information isn't stored anymore on `clean::Attributes` type but instead computed on-demand, so we need this information in later parts of rustdoc.
 * I removed the `bool_to_options` feature (which makes the code a bit simpler to read for `SingleExt` trait implementation.
 * I updated the version for the feature.

There is only one thing I couldn't figure out: [this comment](https://github.com/rust-lang/rust/pull/79341#discussion_r561855624)

> I think I'll likely scrap the whole `SingleExt` extension trait as the diagnostics for 0 and >1 items should be different.

How/why should they differ?

EDIT: this part has been solved, the current code was fine, just needed a little simplification.

cc `@Nemo157`
r? `@jyn514`

Original PR description:

This is only active when the `doc_cfg` feature is active.

The implicit cfg can be overridden via `#[doc(cfg(...))]`, so e.g. to hide a `#[cfg]` you can use something like:

```rust
#[cfg(unix)]
#[doc(cfg(all()))]
pub struct Unix;
```

By adding `#![doc(cfg_hide(foobar))]` to the crate attributes the cfg `#[cfg(foobar)]` (and _only_ that _exact_ cfg) will not be implicitly treated as a `doc(cfg)` to render a message in the documentation.
2021-10-07 16:24:53 +02:00
..
backtrace Add Frames iterator for Backtrace 2021-01-23 11:56:33 -06:00
collections Stabilize try_reserve 2021-10-04 10:29:46 +01:00
env std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
error std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
f32 More lerp tests, altering lerp docs 2021-06-13 14:00:15 -04:00
f64 More lerp tests, altering lerp docs 2021-06-13 14:00:15 -04:00
ffi Clarify that CString::from_vec_unchecked appends 0 byte. 2021-09-28 05:51:52 +05:00
fs Fix may not to appropriate might not or must not 2021-07-29 01:15:20 -04:00
io Rollup merge of #87601 - a1phyr:feature_uint_add_signed, r=kennytm 2021-10-06 12:33:13 -07:00
lazy Upgrade wasm32 image to Ubuntu 20.04 2021-02-06 13:05:56 +01:00
net Rollup merge of #89138 - newpavlov:patch-2, r=dtolnay 2021-10-03 23:13:21 -07:00
num rustc_expand: Mark inner #![test] attributes as soft-unstable 2020-11-20 19:35:03 +03:00
os Suppress some cfg from being shown in the stdlib docs 2021-10-05 18:15:29 +02:00
panic review: fix nits and move panic safety tests to the correct place 2020-09-25 23:10:24 +02:00
path path.push() should work as expected on windows verbatim paths 2021-10-01 19:54:57 +01:00
prelude Move asm! and global_asm! to core::arch 2021-07-18 18:30:58 -04:00
process Test that env_clear works on Windows 2021-06-24 09:32:24 +01:00
sync Practice diagnostic message convention 2021-10-03 16:16:28 +09:00
sys Rollup merge of #89324 - yoshuawuyts:hardware-parallelism, r=m-ou-se 2021-10-06 12:33:17 -07:00
sys_common Merge two THREAD_INFO.with and following RefCell borrow 2021-09-16 15:24:53 +02:00
thread Rollup merge of #89324 - yoshuawuyts:hardware-parallelism, r=m-ou-se 2021-10-06 12:33:17 -07:00
time Rollup merge of #88651 - AGSaidi:monotonize-inner-64b-aarch64, r=dtolnay 2021-10-04 23:56:17 -07:00
alloc.rs Rename rterr to rtprintpanic 2021-05-19 15:52:09 +02:00
ascii.rs Convert many files to intra-doc links 2020-09-02 17:37:40 -04:00
backtrace.rs Fix may not to appropriate might not or must not 2021-07-29 01:15:20 -04:00
env.rs library/std/env: Add 'm68k' to comment on ARCH constant 2021-09-17 15:07:14 +00:00
error.rs Stabilize try_reserve 2021-10-04 10:29:46 +01:00
f32.rs Fix may not to appropriate might not or must not 2021-07-29 01:15:20 -04:00
f64.rs Fix may not to appropriate might not or must not 2021-07-29 01:15:20 -04:00
fs.rs Auto merge of #89165 - jkugelman:read-to-end-overallocation, r=joshtriplett 2021-10-04 04:44:56 +00:00
keyword_docs.rs Fix typo in break docs 2021-09-16 14:51:14 +03:00
lazy.rs PR fixup 2021-09-22 05:17:30 -04:00
lib.rs Rollup merge of #89596 - GuillaumeGomez:implicit-doc-cfg, r=jyn514 2021-10-07 16:24:53 +02:00
macros.rs bump bootstrap compiler to 1.55 2021-08-01 11:19:24 -04:00
num.rs Add Saturating type (based on Wrapping type) 2021-08-10 19:27:01 +02:00
panic.rs Allow panic!("{}", computed_str) in const fn. 2021-09-15 21:56:43 +01:00
panicking.rs Bump stage0 compiler to 1.56 2021-09-08 20:51:05 -04:00
path.rs path.push() should work as expected on windows verbatim paths 2021-10-01 19:54:57 +01:00
primitive_docs.rs Add primitive documentation to libcore 2021-09-12 02:23:08 +00:00
process.rs Merge sys_common::rt into rt 2021-09-16 14:32:32 +02:00
rt.rs Auto merge of #89011 - bjorn3:restructure_rt, r=dtolnay 2021-09-29 17:58:08 +00:00
time.rs Auto merge of #86191 - kawadakk:release-add-solid-support, r=nagisa,estebank,m-ou-se, 2021-09-28 11:50:33 +00:00