Files
rust/src/lib.rs

29 lines
900 B
Rust
Raw Normal View History

#![feature(globs, phase, plugin_registrar)]
2014-11-19 14:27:34 +05:30
2014-11-20 00:18:31 +05:30
#![allow(unused_imports)]
2014-11-19 14:27:34 +05:30
#[phase(plugin, link)]
2014-11-19 14:27:34 +05:30
extern crate syntax;
#[phase(plugin, link)]
extern crate rustc;
2014-11-20 12:37:37 +05:30
// Only for the compile time checking of paths
extern crate collections;
2014-11-19 14:27:34 +05:30
use rustc::plugin::Registry;
use rustc::lint::LintPassObject;
pub mod types;
2014-11-20 00:18:31 +05:30
pub mod misc;
2014-11-19 14:27:34 +05:30
#[plugin_registrar]
pub fn plugin_registrar(reg: &mut Registry) {
reg.register_lint_pass(box types::TypePass as LintPassObject);
2014-11-20 00:18:31 +05:30
reg.register_lint_pass(box misc::MiscPass as LintPassObject);
2014-12-15 20:23:45 +05:30
reg.register_lint_pass(box misc::StrToStringPass as LintPassObject);
reg.register_lint_pass(box misc::TopLevelRefPass as LintPassObject);
2014-12-26 05:24:44 +05:30
reg.register_lint_group("clippy", vec![types::BOX_VEC, types::DLIST,
misc::SINGLE_MATCH, misc::STR_TO_STRING,
misc::TOPLEVEL_REF_ARG]);
2014-12-11 03:04:58 +05:30
}