Skip to content

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
Contributor

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