-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
rustc --cfg=')' exits without error #73026
Copy link
Copy link
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Code
Running the command
rustc --cfg=']'exits without any meaningful error.Meta
rustc --version --verbose:Also reproduced on godbold.org with the 1.45 nightly.
Changing version on godbold.org shows the problem start occuring in 1.39.
(rustc 1.38 properly give an error)
Background
I had a typo in my build.rs script, it looked something like that:
cargo buildwas then simply giving me an single meaningless errorI then had to try bisecting the code trying to find out where was the problem (as i had many change both in the build script and in the actual crate, it was not obvious what was the problem) until i found out the leftover ']' which was there from a copy paste from a line in https://doc.rust-lang.org/cargo/reference/build-scripts.html#outputs-of-the-build-script