6eb4735acc
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 Co-authored-by: Vadim Petrochenkov <vadim.petrochenkov@gmail.com>
5 lines
143 B
Rust
5 lines
143 B
Rust
#![feature(doc_cfg)]
|
|
#[doc(cfg = "x")] //~ ERROR not followed by parentheses
|
|
#[doc(cfg(x, y))] //~ ERROR multiple `cfg` predicates
|
|
struct S {}
|