Skip to content

Parse errors not reported sometimes inside --cfg option #89358

Closed
@mwkmwkmwk

Description

@mwkmwkmwk

I tried this command:

rustc --cfg "abc\""

(note the lone stray quote passed at the end of the argument)

I expected to see this happen:

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

Instead, this happened: rustc exits with code 1, but with no output on stderr or stdout

Meta

rustc --version --verbose:

rustc 1.55.0 (c8dfcfe04 2021-09-06)
binary: rustc
commit-hash: c8dfcfe046a7680554bf4eb612bad840e7631c4b
commit-date: 2021-09-06
host: x86_64-unknown-linux-gnu
release: 1.55.0
LLVM version: 12.0.1

(but, same on current nightly)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions