aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_plugins
diff options
context:
space:
mode:
Diffstat (limited to 'components/script_plugins')
-rw-r--r--components/script_plugins/lib.rs1
-rw-r--r--components/script_plugins/unrooted_must_root.rs15
-rw-r--r--components/script_plugins/utils.rs2
3 files changed, 8 insertions, 10 deletions
diff --git a/components/script_plugins/lib.rs b/components/script_plugins/lib.rs
index eb21b57be16..4ed12129df1 100644
--- a/components/script_plugins/lib.rs
+++ b/components/script_plugins/lib.rs
@@ -17,7 +17,6 @@
#![deny(unsafe_code)]
#![feature(macro_at_most_once_rep)]
-#![feature(macro_vis_matcher)]
#![feature(plugin)]
#![feature(plugin_registrar)]
#![feature(rustc_private)]
diff --git a/components/script_plugins/unrooted_must_root.rs b/components/script_plugins/unrooted_must_root.rs
index 86825808f2c..81dece8fdd5 100644
--- a/components/script_plugins/unrooted_must_root.rs
+++ b/components/script_plugins/unrooted_must_root.rs
@@ -4,10 +4,9 @@
use rustc::hir::{self, ExprKind};
use rustc::hir::intravisit as visit;
-use rustc::hir::map as ast_map;
use rustc::lint::{LateContext, LintPass, LintArray, LateLintPass, LintContext};
use rustc::ty;
-use syntax::{ast, codemap, symbol::Ident};
+use syntax::{ast, source_map, symbol::Ident};
use utils::{match_def_path, in_derive_expn};
declare_lint!(UNROOTED_MUST_ROOT, Deny,
@@ -43,7 +42,7 @@ fn is_unrooted_ty(cx: &LateContext, ty: &ty::TyS, in_new_function: bool) -> bool
let mut ret = false;
ty.maybe_walk(|t| {
match t.sty {
- ty::TyAdt(did, _) => {
+ ty::Adt(did, _) => {
if cx.tcx.has_attr(did.did, "must_root") {
ret = true;
false
@@ -67,9 +66,9 @@ fn is_unrooted_ty(cx: &LateContext, ty: &ty::TyS, in_new_function: bool) -> bool
true
}
},
- ty::TyRef(..) => false, // don't recurse down &ptrs
- ty::TyRawPtr(..) => false, // don't recurse down *ptrs
- ty::TyFnDef(..) | ty::TyFnPtr(_) => false,
+ ty::Ref(..) => false, // don't recurse down &ptrs
+ ty::RawPtr(..) => false, // don't recurse down *ptrs
+ ty::FnDef(..) | ty::FnPtr(_) => false,
_ => true
}
});
@@ -91,7 +90,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
_gen: &hir::Generics,
id: ast::NodeId) {
let item = match cx.tcx.hir.get(id) {
- ast_map::Node::NodeItem(item) => item,
+ hir::Node::Item(item) => item,
_ => cx.tcx.hir.expect_item(cx.tcx.hir.get_parent(id)),
};
if item.attrs.iter().all(|a| !a.check_name("must_root")) {
@@ -130,7 +129,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
kind: visit::FnKind,
decl: &'tcx hir::FnDecl,
body: &'tcx hir::Body,
- span: codemap::Span,
+ span: source_map::Span,
id: ast::NodeId) {
let in_new_function = match kind {
visit::FnKind::ItemFn(n, _, _, _, _) |
diff --git a/components/script_plugins/utils.rs b/components/script_plugins/utils.rs
index 92797f81430..f264a65ea0a 100644
--- a/components/script_plugins/utils.rs
+++ b/components/script_plugins/utils.rs
@@ -4,7 +4,7 @@
use rustc::hir::def_id::DefId;
use rustc::lint::LateContext;
-use syntax::codemap::{ExpnFormat, Span};
+use syntax::source_map::{ExpnFormat, Span};
/// check if a DefId's path matches the given absolute type path
/// usage e.g. with