Upgrade rust to f93ab64d4a1a7ee91759a1594ab2a426b6cc657e/rustc-1.5.0-dev.

This commit is contained in:
Manish Goregaokar 2015-09-21 13:12:01 +05:30 committed by Ms2ger
parent 8f1469eb08
commit 3c969b346a
40 changed files with 253 additions and 253 deletions

View file

@ -2,8 +2,8 @@
* 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/. */
use rustc::lint::{Context, LintPass, LintArray};
use syntax::ast;
use rustc::lint::{EarlyContext, LintPass, LintArray, EarlyLintPass, LintContext};
use syntax::ast::Ty;
use utils::match_ty_unwrap;
declare_lint!(BANNED_TYPE, Deny,
@ -21,8 +21,10 @@ impl LintPass for BanPass {
fn get_lints(&self) -> LintArray {
lint_array!(BANNED_TYPE)
}
}
fn check_ty(&mut self, cx: &Context, ty: &ast::Ty) {
impl EarlyLintPass for BanPass {
fn check_ty(&mut self, cx: &EarlyContext, ty: &Ty) {
if match_ty_unwrap(ty, &["std", "cell", "Cell"])
.and_then(|t| t.get(0))
.and_then(|t| match_ty_unwrap(&**t, &["dom", "bindings", "js", "JS"]))