Closed
Description
I tried this code:
#![feature(doc_cfg)]
#[doc(cfg(x, y))]
fn bar() {}
I expected to see this happen: An error, to match the behavior on #[cfg(x, y)]
:
error: multiple `cfg` predicates are specified
--> cfg2.rs:1:10
|
1 | #[cfg(x, y)]
| ^
Instead, this happened: Rustdoc silently accepts the code.
Relevant code:
rust/src/librustdoc/clean/cfg.rs
Line 62 in 88b99de
I think the relevant rustc code is
rust/compiler/rustc_expand/src/config.rs
Line 455 in 88b99de
Meta
rustdoc --version
: rustdoc 1.53.0-nightly (392ba2b 2021-04-17)