-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Custom target names containing bin
lead to 'failed to parse the cfg from rustc --print=cfg
' error
#7363
Labels
C-bug
Category: bug
Comments
This is a fairly simple parsing error caused by this line. Any unsupported crate type in the target name will cause a problem, since it is naively scanning through the error message:
The solution should be to parse the error a little more tightly. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to Reproduce
cargo new foo --lib
andcd foo
Create file named
custom-bin-target.json
with the following content:Run
cargo build --target custom-bin-target.json
The Error
The following error occurs:
Debugging
When renaming the target file to
custom-target.json
, the error disappears. Renaming toa-b-c.json
andtarget.json
works too, but anything with the substring "bin" leads to the same error (e.g.bin.json
oraabinoo.json
). So the problem seems to be the substring "bin", but I have now idea why.Versions
The text was updated successfully, but these errors were encountered: