The biggest language change is that enum variants now also reserve (for future use) a name in the type namespace, which must not collide with other types. Some things were renamed, and others qualified as `module::name`. Source-Repo: https://github.com/servo/servo Source-Revision: 7409685589c550ee7a9f94182f511acddab4c6fd
33 lines
916 B
Rust
33 lines
916 B
Rust
/* 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;
|
|
use syntax::ext::base::Decorator;
|
|
|
|
use syntax::parse::token::intern;
|
|
|
|
mod lints;
|
|
mod macros;
|
|
mod jstraceable;
|
|
|
|
#[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);
|
|
reg.register_syntax_extension(intern("jstraceable"), Decorator(box jstraceable::expand_jstraceable))
|
|
}
|
|
|