forked from rust-lang/rust-clippy
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move
items_after_test_module
logic into check_crate
- Loading branch information
Showing
3 changed files
with
19 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
//@compile-flags: --test | ||
#![allow(unused)] | ||
#![warn(clippy::items_after_test_module)] | ||
|
||
|
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 |
---|---|---|
@@ -1,2 +1,18 @@ | ||
error: Option 'test' given more than once | ||
error: items were found after the testing module | ||
--> $DIR/block_module.rs:12:1 | ||
| | ||
LL | / mod tests { | ||
LL | | #[test] | ||
LL | | fn hi() {} | ||
LL | | } | ||
... | | ||
LL | | () => {}; | ||
LL | | } | ||
| |_^ | ||
| | ||
= help: move the items to before the testing module was defined | ||
= note: `-D clippy::items-after-test-module` implied by `-D warnings` | ||
= help: to override `-D warnings` add `#[allow(clippy::items_after_test_module)]` | ||
|
||
error: aborting due to previous error | ||
|