Upgrade to rustc 1.29.0-nightly (e06c87544 2018-07-06)

This commit is contained in:
Simon Sapin 2018-06-24 12:22:28 +02:00
parent 1b9d8fa674
commit a09899be99
3 changed files with 5 additions and 5 deletions

View file

@ -7,7 +7,7 @@ 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};
use syntax::{ast, codemap, symbol::Ident};
use utils::{match_def_path, in_derive_expn};
declare_lint!(UNROOTED_MUST_ROOT, Deny,
@ -133,8 +133,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
span: codemap::Span,
id: ast::NodeId) {
let in_new_function = match kind {
visit::FnKind::ItemFn(n, _, _, _, _, _, _) |
visit::FnKind::Method(n, _, _, _) => {
visit::FnKind::ItemFn(n, _, _, _, _) |
visit::FnKind::Method(Ident { name: n, .. }, _, _, _) => {
&*n.as_str() == "new" || n.as_str().starts_with("new_")
}
visit::FnKind::Closure(_) => return,