aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_plugins/lib.rs
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2020-01-16 08:46:41 +0100
committerSimon Sapin <simon.sapin@exyr.org>2020-01-16 08:46:41 +0100
commit850f52c32778ac0ad0ea48580a4b7006970f5c94 (patch)
tree808be9570ccf4aab3ff5707991c083f87dd2d004 /components/script_plugins/lib.rs
parenteb8fbddca95306b63012f8b848f2396c37ab8122 (diff)
downloadservo-850f52c32778ac0ad0ea48580a4b7006970f5c94.tar.gz
servo-850f52c32778ac0ad0ea48580a4b7006970f5c94.zip
Upgrade to rustc 1.42.0-nightly (3291ae339 2020-01-15)
Diffstat (limited to 'components/script_plugins/lib.rs')
-rw-r--r--components/script_plugins/lib.rs25
1 files changed, 16 insertions, 9 deletions
diff --git a/components/script_plugins/lib.rs b/components/script_plugins/lib.rs
index 0bd43021a2e..89a7312d0a0 100644
--- a/components/script_plugins/lib.rs
+++ b/components/script_plugins/lib.rs
@@ -23,21 +23,24 @@
extern crate matches;
extern crate rustc;
extern crate rustc_driver;
+extern crate rustc_hir;
+extern crate rustc_lint;
extern crate rustc_session;
+extern crate rustc_span;
extern crate syntax;
-use rustc::hir::def_id::DefId;
-use rustc::hir::intravisit as visit;
-use rustc::hir::{self, ExprKind, HirId};
-use rustc::lint::{LateContext, LateLintPass, LintContext, LintPass};
use rustc::ty;
use rustc_driver::plugin::Registry;
+use rustc_hir::def_id::DefId;
+use rustc_hir::intravisit as visit;
+use rustc_hir::{self as hir, ExprKind, HirId};
+use rustc_lint::{LateContext, LateLintPass, LintContext, LintPass};
use rustc_session::declare_lint;
+use rustc_span::source_map;
+use rustc_span::source_map::{ExpnKind, MacroKind, Span};
+use rustc_span::symbol::sym;
+use rustc_span::symbol::Symbol;
use syntax::ast::{AttrKind, Attribute};
-use syntax::source_map;
-use syntax::source_map::{ExpnKind, MacroKind, Span};
-use syntax::symbol::sym;
-use syntax::symbol::Symbol;
#[allow(deprecated)]
#[plugin_registrar]
@@ -290,6 +293,8 @@ struct FnDefVisitor<'a, 'b: 'a, 'tcx: 'a + 'b> {
}
impl<'a, 'b, 'tcx> visit::Visitor<'tcx> for FnDefVisitor<'a, 'b, 'tcx> {
+ type Map = rustc::hir::map::Map<'tcx>;
+
fn visit_expr(&mut self, expr: &'tcx hir::Expr) {
let cx = self.cx;
@@ -353,7 +358,9 @@ impl<'a, 'b, 'tcx> visit::Visitor<'tcx> for FnDefVisitor<'a, 'b, 'tcx> {
fn visit_ty(&mut self, _: &'tcx hir::Ty) {}
- fn nested_visit_map<'this>(&'this mut self) -> hir::intravisit::NestedVisitorMap<'this, 'tcx> {
+ fn nested_visit_map<'this>(
+ &'this mut self,
+ ) -> hir::intravisit::NestedVisitorMap<'this, Self::Map> {
hir::intravisit::NestedVisitorMap::OnlyBodies(&self.cx.tcx.hir())
}
}