-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
--cfg accepts invalid cfgs #31495
Comments
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
# for free
to join this conversation on GitHub.
Already have an account?
# 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: