Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--cfg accepts bogus grammar #31497

Closed
brson opened this issue Feb 8, 2016 · 1 comment
Closed

--cfg accepts bogus grammar #31497

brson opened this issue Feb 8, 2016 · 1 comment
Labels
A-parser Area: The parsing of Rust source code to an AST

Comments

@brson
Copy link
Contributor

brson commented Feb 8, 2016

These all work: --cfg "a - b", --cfg a%, --cfg "a { b }".

@brson brson added I-wrong A-parser Area: The parsing of Rust source code to an AST labels Feb 8, 2016
@brson brson changed the title --print cfg accepts bogus grammar --cfg accepts bogus grammar Feb 8, 2016
@dirk
Copy link
Contributor

dirk commented Feb 10, 2016

I'm giving this a shot with changing it to only accept identifiers as valid cfg's.

dirk added a commit to dirk/rust that referenced this issue Feb 15, 2016
Includes compile-fail test to check that it fails on incomplete
`--cfg` matches.

Fixes rust-lang#31497.
bors added a commit that referenced this issue Feb 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-parser Area: The parsing of Rust source code to an AST
Projects
None yet
Development

No branches or pull requests

2 participants