-
Notifications
You must be signed in to change notification settings - Fork 13k
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 invalid cfgs #31495
Comments
brson
added
A-driver
Area: rustc_driver that ties everything together into the `rustc` compiler
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
labels
Feb 8, 2016
This is probably pretty easy. Comparing the parsing in libsyntax with the parsing in librustc_driver and fix the latter to be like the former. Add a test to src/tests/compile-fail with the |
Should |
I'm assuming it should not for now. |
@kamalmarhubi No it should not. |
kamalmarhubi
added a commit
to kamalmarhubi/rust
that referenced
this issue
Feb 8, 2016
kamalmarhubi
added a commit
to kamalmarhubi/rust
that referenced
this issue
Feb 8, 2016
A spec like `#[cfg(foo(bar))]` is not allowed as an attribute. This makes the same spec be rejected by the compiler if passed in as a `--cfg` argument. Fixes rust-lang#31495
Excellent, less fixup work for me :-) |
bors
added a commit
that referenced
this issue
Feb 10, 2016
A spec like `#[cfg(foo(bar))]` is not allowed as an attribute. This makes the same spec be rejected by the compiler if passed in as a `--cfg` argument. Fixes #31495
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
List meta items are not allowed in
cfg
specs because the compiler reserves them for built-in predicates likeany
.So for example you can't write
You can though write `rustc --cfg "foo(bar))". This should be similarly rejected.
cc #31278
The text was updated successfully, but these errors were encountered: