1 // compile-flags: -Z unstable-options
3 #![feature(rustc_private)]
4 #![deny(rustc::lint_pass_impl_without_macro)]
8 use rustc::lint::{LintArray, LintPass};
9 use rustc::{declare_lint, declare_lint_pass, impl_lint_pass, lint_array};
19 impl LintPass for Foo { //~ERROR implementing `LintPass` by hand
20 fn get_lints(&self) -> LintArray {
21 lint_array!(TEST_LINT)
24 fn name(&self) -> &'static str {
29 macro_rules! custom_lint_pass_macro {
33 impl LintPass for Custom { //~ERROR implementing `LintPass` by hand
34 fn get_lints(&self) -> LintArray {
35 lint_array!(TEST_LINT)
38 fn name(&self) -> &'static str {
45 custom_lint_pass_macro!();
49 impl_lint_pass!(Bar => [TEST_LINT]);
51 declare_lint_pass!(Baz => [TEST_LINT]);