diff --git a/components/plugins/lib.rs b/components/plugins/lib.rs index 8f9f698f1d8..4a6b3e6ed4f 100644 --- a/components/plugins/lib.rs +++ b/components/plugins/lib.rs @@ -13,7 +13,7 @@ //! - `#[dom_struct]` : Implies `#[privatize]`,`#[jstraceable]`, and `#[must_root]`. //! Use this for structs that correspond to a DOM type -#![feature(plugin_registrar, quote, plugin, box_syntax, rustc_private, collections)] +#![feature(plugin_registrar, quote, plugin, box_syntax, rustc_private)] #[macro_use] extern crate syntax; diff --git a/components/plugins/lints/str_to_string.rs b/components/plugins/lints/str_to_string.rs index d93268844e0..cf8c4b396ad 100644 --- a/components/plugins/lints/str_to_string.rs +++ b/components/plugins/lints/str_to_string.rs @@ -34,12 +34,12 @@ impl LintPass for StrToStringPass { fn is_str(cx: &Context, expr: &ast::Expr) -> bool { fn walk_ty<'t>(ty: ty::Ty<'t>) -> ty::Ty<'t> { match ty.sty { - ty::ty_ptr(ref tm) | ty::ty_rptr(_, ref tm) => walk_ty(tm.ty), + ty::TyRef(_, ref tm) | ty::TyRawPtr(ref tm) => walk_ty(tm.ty), _ => ty } } match walk_ty(expr_ty(cx.tcx, expr)).sty { - ty::ty_str => true, + ty::TyStr => true, _ => false } } diff --git a/components/plugins/lints/unrooted_must_root.rs b/components/plugins/lints/unrooted_must_root.rs index 09650dce190..7c1d8161f67 100644 --- a/components/plugins/lints/unrooted_must_root.rs +++ b/components/plugins/lints/unrooted_must_root.rs @@ -2,8 +2,9 @@ * 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 syntax::{ast, codemap, visit, ast_map}; +use syntax::{ast, codemap, visit}; use syntax::attr::AttrMetaMethods; +use rustc::ast_map; use rustc::lint::{Context, LintPass, LintArray}; use rustc::middle::ty::expr_ty; use rustc::middle::{ty, def}; @@ -159,8 +160,8 @@ impl LintPass for UnrootedPass { let t = expr_ty(cx.tcx, &*expr); match t.sty { - ty::ty_struct(did, _) | - ty::ty_enum(did, _) => { + ty::TyStruct(did, _) | + ty::TyEnum(did, _) => { if ty::has_attr(cx.tcx, did, "must_root") { cx.span_lint(UNROOTED_MUST_ROOT, expr.span, &format!("Expression of type {} must be rooted", t.repr(cx.tcx))); diff --git a/components/plugins/utils.rs b/components/plugins/utils.rs index e7f4c36cde2..9d98f568a6c 100644 --- a/components/plugins/utils.rs +++ b/components/plugins/utils.rs @@ -2,11 +2,12 @@ * 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::ast_map; use rustc::lint::Context; use rustc::middle::{ty, def}; use syntax::ptr::P; -use syntax::{ast, ast_map}; +use syntax::ast; use syntax::ast::{TyPath, Path, AngleBracketedParameters, PathSegment, Ty}; use syntax::attr::mark_used;