1 // error-pattern:cargo-clippy
2 #![feature(type_macros)]
3 #![feature(plugin_registrar, box_syntax)]
4 #![feature(rustc_private, collections)]
5 #![feature(custom_attribute)]
6 #![feature(slice_patterns)]
7 #![feature(question_mark)]
8 #![feature(stmt_expr_attributes)]
9 #![allow(indexing_slicing, shadow_reuse, unknown_lints)]
18 // Only for the compile time checking of paths
20 extern crate collections;
22 // for unicode nfc normalization
23 extern crate unicode_normalization;
25 // for semver check in attrs.rs
29 extern crate regex_syntax;
31 // for finding minimal boolean expressions
32 extern crate quine_mc_cluskey;
34 extern crate rustc_plugin;
35 extern crate rustc_const_eval;
36 extern crate rustc_const_math;
37 use rustc_plugin::Registry;
39 extern crate clippy_lints;
41 pub use clippy_lints::*;
43 macro_rules! declare_restriction_lint {
44 { pub $name:tt, $description:tt } => {
45 declare_lint! { pub $name, Allow, $description }
50 pub use syntax::ast::{Name, NodeId};
54 pub fn plugin_registrar(reg: &mut Registry) {
55 register_plugins(reg);
58 // only exists to let the dogfood integration test works.
59 // Don't run clippy as an executable directly
60 #[allow(dead_code, print_stdout)]
62 panic!("Please use the cargo-clippy executable");