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

Upgraded warning for invalid crate_type attribute syntax to an error (#16974) #25252

Merged
merged 1 commit into from
May 10, 2015

Conversation

inrustwetrust
Copy link
Contributor

Fixes the problem in #16974 with unhelpful error messages when accidentally using the wrong syntax for the crate_type="lib" attribute. The attribute syntax error now shows up instead of "main function not found".

If the user intended to set the crate_type to "lib" but accidentally used
incorrect syntax such as `#![crate_type(lib)]`, the compilation would fail with
"main function not found". This made it hard to locate the source of the
problem, since the failure would cause the warning about the incorrect
attribute not to be shown.
@rust-highfive
Copy link
Collaborator

r? @huonw

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member

@bors: r+ 8e8f8d9 rollup

Thanks

Manishearth added a commit to Manishearth/rust that referenced this pull request May 10, 2015
… r=alexcrichton

Fixes the problem in rust-lang#16974 with unhelpful error messages when accidentally using the wrong syntax for the `crate_type="lib"` attribute. The attribute syntax error now shows up instead of "main function not found".
Manishearth added a commit to Manishearth/rust that referenced this pull request May 10, 2015
… r=alexcrichton

Fixes the problem in rust-lang#16974 with unhelpful error messages when accidentally using the wrong syntax for the `crate_type="lib"` attribute. The attribute syntax error now shows up instead of "main function not found".
bors added a commit that referenced this pull request May 10, 2015
@bors bors merged commit 8e8f8d9 into rust-lang:master May 10, 2015
@inrustwetrust inrustwetrust deleted the crate-type-attribute branch May 10, 2015 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants