Upgrade to rustc 1.30.0-nightly (721913067 2018-08-26)

This commit is contained in:
Simon Sapin 2018-08-27 10:46:28 +02:00
parent da36740f0b
commit a6dcfdcd55
6 changed files with 11 additions and 14 deletions

View file

@ -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)]

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, 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 +43,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 +67,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
}
});
@ -130,7 +130,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, _, _, _, _) |

View file

@ -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