diff --git a/components/script_plugins/unrooted_must_root.rs b/components/script_plugins/unrooted_must_root.rs index 58700e5d6b6e..dc38054720cf 100644 --- a/components/script_plugins/unrooted_must_root.rs +++ b/components/script_plugins/unrooted_must_root.rs @@ -7,7 +7,7 @@ use rustc::hir::intravisit as visit; use rustc::hir::{self, ExprKind}; use rustc::lint::{LateContext, LateLintPass, LintArray, LintContext, LintPass}; use rustc::ty; -use syntax::{ast, source_map, symbol::Ident}; +use syntax::{ast, source_map}; declare_lint!( UNROOTED_MUST_ROOT, @@ -168,8 +168,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass { id: ast::NodeId, ) { let in_new_function = match kind { - visit::FnKind::ItemFn(n, _, _, _, _) | - visit::FnKind::Method(Ident { name: n, .. }, _, _, _) => { + visit::FnKind::ItemFn(n, _, _, _, _) | visit::FnKind::Method(n, _, _, _) => { &*n.as_str() == "new" || n.as_str().starts_with("new_") }, visit::FnKind::Closure(_) => return, diff --git a/rust-toolchain b/rust-toolchain index b3ce0a23f6ea..3bd0575c2408 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2019-01-04 +nightly-2019-01-15