Skip to content

rustdoc doesn't parse cfgspecs properly #22131

@apasel422

Description

@apasel422

It treats something like feature=bar as a single MetaWord instead of a MetaNameValue. This is due to the code on lines 70-73 of librustdoc/test.rs:

cfg.extend(cfgs.into_iter().map(|cfg_| {
    let cfg_ = token::intern_and_get_ident(&cfg_);
    P(dummy_spanned(ast::MetaWord(cfg_)))
}));

I have a PR for this that I will open shortly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions