rust/tests/ui/lint_without_lint_pass.rs

36 lines
563 B
Rust
Raw Normal View History

2018-10-12 08:09:04 +02:00
#![deny(clippy::internal)]
#![feature(rustc_private)]
#[macro_use]
extern crate rustc;
use rustc::lint::{LintArray, LintPass};
2018-10-12 08:09:04 +02:00
#[macro_use]
extern crate clippy_lints;
2018-10-29 20:37:47 +01:00
declare_clippy_lint! {
2018-10-12 08:09:04 +02:00
pub TEST_LINT,
correctness,
""
}
2018-10-29 20:37:47 +01:00
declare_clippy_lint! {
pub TEST_LINT_REGISTERED,
correctness,
""
}
pub struct Pass;
impl LintPass for Pass {
fn name(&self) -> &'static str {
"TEST_LINT"
}
2018-10-29 20:37:47 +01:00
}
declare_lint_pass!(Pass2 => [TEST_LINT_REGISTERED]);
pub struct Pass3;
impl_lint_pass!(Pass3 => [TEST_LINT_REGISTERED]);
2018-12-09 23:26:16 +01:00
fn main() {}