]> git.lizzy.rs Git - rust.git/commit
Upgraded warning for invalid crate_type attribute syntax to an error
authorinrustwetrust <inrustwetrust@users.noreply.github.com>
Sat, 9 May 2015 22:07:26 +0000 (00:07 +0200)
committerinrustwetrust <inrustwetrust@users.noreply.github.com>
Sat, 9 May 2015 22:07:26 +0000 (00:07 +0200)
commit8e8f8d9a5a35eb5875999efac7837956ed1b20da
tree3429248fc009c88153f24260455786c004796a8d
parentd8b64c7fb2809eeba8ff9125cc95c4c38efb9a8a
Upgraded warning for invalid crate_type attribute syntax to an error

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.
src/librustc_driver/driver.rs
src/test/compile-fail/invalid_crate_type_syntax.rs [new file with mode: 0644]