1 // compile-flags: -Z unstable-options
3 #![feature(rustc_private)]
4 #![deny(rustc::lint_pass_impl_without_macro)]
7 extern crate rustc_session;
9 use rustc::lint::{LintArray, LintPass};
10 use rustc::{declare_lint_pass, impl_lint_pass};
11 use rustc_session::declare_lint;
21 impl LintPass for Foo { //~ERROR implementing `LintPass` by hand
22 fn name(&self) -> &'static str {
27 macro_rules! custom_lint_pass_macro {
31 impl LintPass for Custom { //~ERROR implementing `LintPass` by hand
32 fn name(&self) -> &'static str {
39 custom_lint_pass_macro!();
43 impl_lint_pass!(Bar => [TEST_LINT]);
45 declare_lint_pass!(Baz => [TEST_LINT]);