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