Remove clippy dependency in lint_without_lint_pass

This commit is contained in:
Manish Goregaokar 2019-11-07 12:48:22 -08:00
parent fe90b82951
commit 4721f4419b
2 changed files with 21 additions and 20 deletions

View File

@ -5,25 +5,25 @@
extern crate rustc;
use rustc::lint::{LintArray, LintPass};
#[macro_use]
extern crate clippy_lints;
declare_clippy_lint! {
pub TEST_LINT,
correctness,
""
declare_tool_lint! {
pub clippy::TEST_LINT,
Warn,
"",
report_in_external_macro: true
}
declare_clippy_lint! {
pub TEST_LINT_REGISTERED,
correctness,
""
declare_tool_lint! {
pub clippy::TEST_LINT_REGISTERED,
Warn,
"",
report_in_external_macro: true
}
declare_clippy_lint! {
pub TEST_LINT_REGISTERED_ONLY_IMPL,
correctness,
""
declare_tool_lint! {
pub clippy::TEST_LINT_REGISTERED_ONLY_IMPL,
Warn,
"",
report_in_external_macro: true
}
pub struct Pass;

View File

@ -1,10 +1,11 @@
error: the lint `TEST_LINT` is not added to any `LintPass`
--> $DIR/lint_without_lint_pass.rs:11:1
--> $DIR/lint_without_lint_pass.rs:8:1
|
LL | / declare_clippy_lint! {
LL | | pub TEST_LINT,
LL | | correctness,
LL | | ""
LL | / declare_tool_lint! {
LL | | pub clippy::TEST_LINT,
LL | | Warn,
LL | | "",
LL | | report_in_external_macro: true
LL | | }
| |_^
|