mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-30 16:39:26 +00:00
24 lines
432 B
Rust
24 lines
432 B
Rust
|
|
#![feature(rustc_private)]
|
|
#![feature(macro_vis_matcher)]
|
|
|
|
#![warn(lint_without_lint_pass)]
|
|
|
|
#[macro_use] extern crate rustc;
|
|
|
|
use rustc::lint::{LintPass, LintArray};
|
|
|
|
declare_lint! { GOOD_LINT, Warn, "good lint" }
|
|
declare_lint! { MISSING_LINT, Warn, "missing lint" }
|
|
|
|
pub struct Pass;
|
|
|
|
impl LintPass for Pass {
|
|
fn get_lints(&self) -> LintArray {
|
|
lint_array![GOOD_LINT]
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
let _ = MISSING_LINT;
|
|
}
|