diff --git a/components/config_plugins/lib.rs b/components/config_plugins/lib.rs index bd2ae2ca6e5..943a5ffc99c 100644 --- a/components/config_plugins/lib.rs +++ b/components/config_plugins/lib.rs @@ -4,8 +4,6 @@ #![feature(proc_macro_diagnostic)] -extern crate proc_macro; - use itertools::Itertools; use proc_macro2::{Span, TokenStream}; use quote::*; diff --git a/components/deny_public_fields/lib.rs b/components/deny_public_fields/lib.rs index 3d50ad4deec..3f6d8b48cf3 100644 --- a/components/deny_public_fields/lib.rs +++ b/components/deny_public_fields/lib.rs @@ -2,8 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -extern crate proc_macro; - use std::str::FromStr; use synstructure::{self, decl_derive}; diff --git a/components/domobject_derive/lib.rs b/components/domobject_derive/lib.rs index 1b082fc9e54..fdc2c84b26e 100644 --- a/components/domobject_derive/lib.rs +++ b/components/domobject_derive/lib.rs @@ -4,7 +4,6 @@ #![recursion_limit = "128"] -extern crate proc_macro; #[macro_use] extern crate quote; #[macro_use] diff --git a/components/layout/lib.rs b/components/layout/lib.rs index 582a3e284d5..fdf3971fc3f 100644 --- a/components/layout/lib.rs +++ b/components/layout/lib.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ #![deny(unsafe_code)] -#![feature(matches_macro)] #[macro_use] extern crate bitflags; diff --git a/components/layout_2020/lib.rs b/components/layout_2020/lib.rs index b8cc003caf5..28ad31ae146 100644 --- a/components/layout_2020/lib.rs +++ b/components/layout_2020/lib.rs @@ -4,7 +4,6 @@ #![deny(unsafe_code)] #![feature(exact_size_is_empty)] -#![feature(matches_macro)] pub mod context; pub mod data; 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()) } } diff --git a/rust-toolchain b/rust-toolchain index 85efddc5ce0..20d9cdab46e 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2019-12-23 +nightly-2020-01-16