Skip to content

Frontmatter inside --cfg and --check-cfg is not feature-gated #146130

@fmease

Description

@fmease

The following invocation works since 1.88 (or PR #140035):

rustc /dev/null --crate-type lib --cfg '---
---
key'

while it shouldn't because unstable feature frontmatter isn't enabled anywhere.

For context, in 1.87, it yielded the following error:

error: invalid `--cfg` argument: `---
       ---
       key` (expected `key` or `key="value"`)

The same applies to --check-cfg.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-CLIArea: Command-line interface (CLI) to the compilerC-bugCategory: This is a bug.F-frontmatter`#![feature(frontmatter)]`P-mediumMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions