Syntax error when using multiple cfg
attributes
#78175
Labels
A-attributes
Area: Attributes (`#[…]`, `#![…]`)
A-diagnostics
Area: Messages for errors, warnings, and lints
A-parser
Area: The parsing of Rust source code to an AST
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
D-newcomer-roadblock
Diagnostics: Confusing error or lint; hard to understand for new users.
D-terse
Diagnostics: An error or lint that doesn't give enough information about the problem at hand.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I encountered a weird behavior when using
cfg(test)
andcfg(not(test))
.I tried this code:
Results in:
Workaround
Meta
Rust stable version 1.47.0
Playground: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=f7f7eb30327396c209b0f358b1a3072b
The text was updated successfully, but these errors were encountered: