Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add linting for
crate_type
attribute values.
This ensures that the `crate_type` attribute always contains a value, and does not contain an invalid value.
- Loading branch information
Showing
6 changed files
with
35 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// regression test for issue 11256 | ||
#[crate_type="foo"]; //~ ERROR invalid `crate_type` value | ||
|
||
fn main() { | ||
return | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// regresion test for issue 11256 | ||
#[crate_type]; //~ ERROR `crate_type` requires a value | ||
|
||
fn main() { | ||
return | ||
} |
8965e34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from alexcrichton
at am0d@8965e34
8965e34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging am0d/rust/crate_type_lint = 8965e34 into auto
8965e34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
am0d/rust/crate_type_lint = 8965e34 merged ok, testing candidate = f0839318
8965e34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some tests failed:
failure: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/3354
exception: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/3335
exception: http://buildbot.rust-lang.org/builders/auto-mac-32-nopt-c/builds/1178
exception: http://buildbot.rust-lang.org/builders/auto-mac-32-nopt-t/builds/1181
exception: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/3338
exception: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/2440
exception: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/2443
exception: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/2443
exception: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/2448
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/3356
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/2443
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/2447
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android/builds/2517
exception: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/3343
exception: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/2445
exception: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/2449
exception: http://buildbot.rust-lang.org/builders/auto-bsd-64-opt/builds/3117
8965e34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from alexcrichton
at am0d@8965e34
8965e34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging am0d/rust/crate_type_lint = 8965e34 into auto
8965e34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
am0d/rust/crate_type_lint = 8965e34 merged ok, testing candidate = d3ae3a2
8965e34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/3341
success: http://buildbot.rust-lang.org/builders/auto-mac-32-nopt-c/builds/1184
success: http://buildbot.rust-lang.org/builders/auto-mac-32-nopt-t/builds/1187
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/3344
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/2446
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/2449
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/3360
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/2449
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/2454
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/3362
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/2449
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/2453
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android/builds/2523
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/3349
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/2451
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/2455
success: http://buildbot.rust-lang.org/builders/auto-bsd-64-opt/builds/3123
8965e34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fast-forwarding master to auto = d3ae3a2