2017-09-18 10:47:33 +00:00
|
|
|
|
2016-09-01 07:07:37 +00:00
|
|
|
#![feature(rustc_private)]
|
2017-10-31 01:21:23 +00:00
|
|
|
#![feature(macro_vis_matcher)]
|
2017-09-18 10:47:33 +00:00
|
|
|
|
2017-05-17 12:19:44 +00:00
|
|
|
#![warn(lint_without_lint_pass)]
|
2016-09-01 07:07:37 +00:00
|
|
|
|
|
|
|
#[macro_use] extern crate rustc;
|
|
|
|
|
|
|
|
use rustc::lint::{LintPass, LintArray};
|
|
|
|
|
|
|
|
declare_lint! { GOOD_LINT, Warn, "good lint" }
|
|
|
|
declare_lint! { MISSING_LINT, Warn, "missing lint" }
|
2017-02-08 13:58:07 +00:00
|
|
|
|
2016-09-01 07:07:37 +00:00
|
|
|
pub struct Pass;
|
|
|
|
|
|
|
|
impl LintPass for Pass {
|
|
|
|
fn get_lints(&self) -> LintArray {
|
|
|
|
lint_array![GOOD_LINT]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let _ = MISSING_LINT;
|
|
|
|
}
|