rust/compiler/rustc_expand
Dylan DPC 0c8c21d224
Rollup merge of #84442 - jyn514:doc-cfg, r=petrochenkov
Unify rustc and rustdoc parsing of `cfg()`

This extracts a new `parse_cfg` function that's used between both.

- Treat `#[doc(cfg(x), cfg(y))]` the same as `#[doc(cfg(x)]
  #[doc(cfg(y))]`. Previously it would be completely ignored.
- Treat `#[doc(inline, cfg(x))]` the same as `#[doc(inline)]
  #[doc(cfg(x))]`. Previously, the cfg would be ignored.
- Pass the cfg predicate through to rustc_expand to be validated

Technically this is a breaking change, but doc_cfg is still nightly so I don't think it matters.

Fixes https://github.com/rust-lang/rust/issues/84437.

r? `````````@petrochenkov`````````
2021-05-07 16:19:19 +02:00
..
src Rollup merge of #84442 - jyn514:doc-cfg, r=petrochenkov 2021-05-07 16:19:19 +02:00
Cargo.toml bumped smallvec deps 2021-02-14 18:03:11 +03:00