aboutsummaryrefslogtreecommitdiffstats
path: root/components/plugins/lib.rs
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2014-09-23 18:23:37 +0530
committerManish Goregaokar <manishsmail@gmail.com>2014-09-23 18:23:37 +0530
commit27f3bcd7183d836bd454e687706b4e76d6d3b312 (patch)
treec6226c89a8ba9171e2d3a37c20b23902c8fc3919 /components/plugins/lib.rs
parent6177a3bdcca974d5070b0ecab0973d42963946ec (diff)
parent5b866e9e4616c63c99ef5c945d3fbaf429b1b460 (diff)
downloadservo-27f3bcd7183d836bd454e687706b4e76d6d3b312.tar.gz
servo-27f3bcd7183d836bd454e687706b4e76d6d3b312.zip
Merge pull request #3435 from Manishearth/macro_reorg
Reorganize macros crate; r=jdm
Diffstat (limited to 'components/plugins/lib.rs')
-rw-r--r--components/plugins/lib.rs30
1 files changed, 30 insertions, 0 deletions
diff --git a/components/plugins/lib.rs b/components/plugins/lib.rs
new file mode 100644
index 00000000000..3247ad383ed
--- /dev/null
+++ b/components/plugins/lib.rs
@@ -0,0 +1,30 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#![feature(macro_rules, plugin_registrar, quote, phase)]
+
+#![deny(unused_imports, unused_variable)]
+
+
+
+#[phase(plugin,link)]
+extern crate syntax;
+#[phase(plugin, link)]
+extern crate rustc;
+#[cfg(test)]
+extern crate sync;
+
+use rustc::lint::LintPassObject;
+use rustc::plugin::Registry;
+
+mod lints;
+mod macros;
+
+
+#[plugin_registrar]
+pub fn plugin_registrar(reg: &mut Registry) {
+ reg.register_lint_pass(box lints::TransmutePass as LintPassObject);
+ reg.register_lint_pass(box lints::UnrootedPass as LintPassObject);
+}
+