mirror of
https://github.com/servo/servo.git
synced 2025-06-12 18:34:39 +00:00
Rename macros crate to plugins
This commit is contained in:
parent
6177a3bdcc
commit
fcb25a35ec
13 changed files with 113 additions and 74 deletions
32
components/plugins/lib.rs
Normal file
32
components/plugins/lib.rs
Normal file
|
@ -0,0 +1,32 @@
|
|||
/* 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;
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
|
||||
#[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);
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue