rust/src/lib.rs

64 lines
1.4 KiB
Rust
Raw Normal View History

// error-pattern:cargo-clippy
2016-02-22 14:25:51 +01:00
#![feature(type_macros)]
2015-01-10 07:26:58 +01:00
#![feature(plugin_registrar, box_syntax)]
#![feature(rustc_private, collections)]
#![feature(custom_attribute)]
#![feature(slice_patterns)]
2016-03-23 12:19:13 +01:00
#![feature(question_mark)]
#![feature(stmt_expr_attributes)]
2016-03-11 22:10:40 +01:00
#![allow(indexing_slicing, shadow_reuse, unknown_lints)]
2014-11-19 09:57:34 +01:00
2015-01-10 07:26:58 +01:00
#[macro_use]
2014-11-19 09:57:34 +01:00
extern crate syntax;
2015-01-10 07:26:58 +01:00
#[macro_use]
2014-11-19 09:57:34 +01:00
extern crate rustc;
extern crate toml;
2014-11-20 08:07:37 +01:00
// Only for the compile time checking of paths
extern crate core;
2014-11-20 08:07:37 +01:00
extern crate collections;
2014-11-19 09:57:34 +01:00
// for unicode nfc normalization
extern crate unicode_normalization;
2016-01-09 02:05:43 +01:00
// for semver check in attrs.rs
extern crate semver;
2016-02-05 00:36:06 +01:00
// for regex checking
extern crate regex_syntax;
2016-03-23 12:19:13 +01:00
// for finding minimal boolean expressions
extern crate quine_mc_cluskey;
extern crate rustc_plugin;
extern crate rustc_const_eval;
extern crate rustc_const_math;
use rustc_plugin::Registry;
2014-11-19 09:57:34 +01:00
extern crate clippy_lints;
pub use clippy_lints::*;
macro_rules! declare_restriction_lint {
{ pub $name:tt, $description:tt } => {
declare_lint! { pub $name, Allow, $description }
};
}
mod reexport {
pub use syntax::ast::{Name, NodeId};
}
2014-11-19 09:57:34 +01:00
#[plugin_registrar]
pub fn plugin_registrar(reg: &mut Registry) {
register_plugins(reg);
}
2015-08-21 17:11:34 +02:00
// only exists to let the dogfood integration test works.
// Don't run clippy as an executable directly
#[allow(dead_code, print_stdout)]
fn main() {
panic!("Please use the cargo-clippy executable");
2014-12-10 22:34:58 +01:00
}