Corey Farwell 2015-11-20 08:58:01 -05:00
parent 0146751bb2
commit f34da4120d
30 changed files with 346 additions and 128 deletions

View file

@ -26,6 +26,8 @@ extern crate tenacious;
#[cfg(feature = "clippy")]
extern crate clippy;
extern crate url;
use rustc::plugin::Registry;
use syntax::ext::base::*;
use syntax::feature_gate::AttributeType::Whitelisted;
@ -41,6 +43,7 @@ pub mod lints;
pub mod reflector;
/// Utilities for writing plugins
pub mod casing;
mod url_plugin;
pub mod utils;
#[plugin_registrar]
@ -51,6 +54,7 @@ pub fn plugin_registrar(reg: &mut Registry) {
reg.register_syntax_extension(intern("derive_HeapSizeOf"), MultiDecorator(box heap_size::expand_heap_size));
reg.register_macro("to_lower", casing::expand_lower);
reg.register_macro("to_upper", casing::expand_upper);
reg.register_macro("url", url_plugin::expand_url);
reg.register_late_lint_pass(box lints::transmute_type::TransmutePass);
reg.register_late_lint_pass(box lints::unrooted_must_root::UnrootedPass::new());
reg.register_late_lint_pass(box lints::privatize::PrivatizePass);