Update to latest rust nightly
This commit is contained in:
parent
31969a388e
commit
9511e6739d
@ -49,7 +49,7 @@ fn is_relevant_item(item: &Item) -> bool {
|
||||
|
||||
fn is_relevant_impl(item: &ImplItem) -> bool {
|
||||
match item.node {
|
||||
MethodImplItem(_, ref block) => is_relevant_block(block),
|
||||
ImplItemKind::Method(_, ref block) => is_relevant_block(block),
|
||||
_ => false
|
||||
}
|
||||
}
|
||||
|
@ -105,7 +105,6 @@ fn is_cast_ty_equal(left: &Ty, right: &Ty) -> bool {
|
||||
is_cast_ty_equal(&*lrmut.ty, &*rrmut.ty),
|
||||
(&TyPath(ref lq, ref lpath), &TyPath(ref rq, ref rpath)) =>
|
||||
both(lq, rq, is_qself_equal) && is_path_equal(lpath, rpath),
|
||||
(&TyParen(ref lty), &TyParen(ref rty)) => is_cast_ty_equal(lty, rty),
|
||||
(&TyInfer, &TyInfer) => true,
|
||||
_ => false
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ fn check_trait_items(cx: &LateContext, item: &Item, trait_items: &[P<TraitItem>]
|
||||
|
||||
fn check_impl_items(cx: &LateContext, item: &Item, impl_items: &[P<ImplItem>]) {
|
||||
fn is_named_self(item: &ImplItem, name: &str) -> bool {
|
||||
item.name.as_str() == name && if let MethodImplItem(ref sig, _) =
|
||||
item.name.as_str() == name && if let ImplItemKind::Method(ref sig, _) =
|
||||
item.node { is_self_sig(sig) } else { false }
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@ use rustc_front::hir::*;
|
||||
use reexport::*;
|
||||
use rustc::lint::*;
|
||||
use syntax::codemap::Span;
|
||||
use rustc_front::visit::{Visitor, walk_ty, walk_ty_param_bound};
|
||||
use rustc_front::intravisit::{Visitor, walk_ty, walk_ty_param_bound};
|
||||
use rustc::middle::def::Def::{DefTy, DefTrait};
|
||||
use std::collections::HashSet;
|
||||
|
||||
@ -29,7 +29,7 @@ impl LateLintPass for LifetimePass {
|
||||
}
|
||||
|
||||
fn check_impl_item(&mut self, cx: &LateContext, item: &ImplItem) {
|
||||
if let MethodImplItem(ref sig, _) = item.node {
|
||||
if let ImplItemKind::Method(ref sig, _) = item.node {
|
||||
check_fn_inner(cx, &sig.decl, Some(&sig.explicit_self),
|
||||
&sig.generics, item.span);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
use rustc::lint::*;
|
||||
use rustc_front::hir::*;
|
||||
use reexport::*;
|
||||
use rustc_front::visit::{Visitor, walk_expr, walk_block, walk_decl};
|
||||
use rustc_front::intravisit::{Visitor, walk_expr, walk_block, walk_decl};
|
||||
use rustc::middle::ty;
|
||||
use rustc::middle::def::DefLocal;
|
||||
use consts::{constant_simple, Constant};
|
||||
|
@ -77,7 +77,7 @@ impl LateLintPass for MethodsPass {
|
||||
if let ItemImpl(_, _, _, None, ref ty, ref items) = item.node {
|
||||
for implitem in items {
|
||||
let name = implitem.name;
|
||||
if let MethodImplItem(ref sig, _) = implitem.node {
|
||||
if let ImplItemKind::Method(ref sig, _) = implitem.node {
|
||||
// check missing trait implementations
|
||||
for &(method_name, n_args, self_kind, out_type, trait_name) in &TRAIT_METHODS {
|
||||
if_let_chain! {
|
||||
|
@ -4,7 +4,7 @@ use rustc_front::hir::*;
|
||||
use reexport::*;
|
||||
use rustc_front::util::{is_comparison_binop, binop_to_string};
|
||||
use syntax::codemap::{Span, Spanned};
|
||||
use rustc_front::visit::FnKind;
|
||||
use rustc_front::intravisit::FnKind;
|
||||
use rustc::middle::ty;
|
||||
use rustc::middle::const_eval::ConstVal::Float;
|
||||
use rustc::middle::const_eval::eval_const_expr_partial;
|
||||
|
@ -34,7 +34,7 @@ impl LateLintPass for PtrArg {
|
||||
}
|
||||
|
||||
fn check_impl_item(&mut self, cx: &LateContext, item: &ImplItem) {
|
||||
if let &MethodImplItem(ref sig, _) = &item.node {
|
||||
if let &ImplItemKind::Method(ref sig, _) = &item.node {
|
||||
if let Some(Node::NodeItem(it)) = cx.tcx.map.find(cx.tcx.map.get_parent(item.id)) {
|
||||
if let ItemImpl(_, _, _, Some(_), _, _) = it.node {
|
||||
return; // ignore trait impls
|
||||
|
@ -2,7 +2,7 @@ use std::ops::Deref;
|
||||
use rustc_front::hir::*;
|
||||
use reexport::*;
|
||||
use syntax::codemap::Span;
|
||||
use rustc_front::visit::{Visitor, FnKind};
|
||||
use rustc_front::intravisit::{Visitor, FnKind};
|
||||
|
||||
use rustc::lint::*;
|
||||
use rustc::middle::def::Def::{DefVariant, DefStruct};
|
||||
@ -237,7 +237,7 @@ fn check_expr(cx: &LateContext, expr: &Expr, bindings: &mut Vec<(Name, Span)>) {
|
||||
|
||||
fn check_ty(cx: &LateContext, ty: &Ty, bindings: &mut Vec<(Name, Span)>) {
|
||||
match ty.node {
|
||||
TyParen(ref sty) | TyObjectSum(ref sty, _) |
|
||||
TyObjectSum(ref sty, _) |
|
||||
TyVec(ref sty) => check_ty(cx, sty, bindings),
|
||||
TyFixedLengthVec(ref fty, ref expr) => {
|
||||
check_ty(cx, fty, bindings);
|
||||
|
@ -3,7 +3,7 @@ use rustc_front::hir::*;
|
||||
use reexport::*;
|
||||
use rustc_front::util::{is_comparison_binop, binop_to_string};
|
||||
use syntax::codemap::Span;
|
||||
use rustc_front::visit::{FnKind, Visitor, walk_ty};
|
||||
use rustc_front::intravisit::{FnKind, Visitor, walk_ty};
|
||||
use rustc::middle::ty;
|
||||
use syntax::ast::IntTy::*;
|
||||
use syntax::ast::UintTy::*;
|
||||
@ -305,8 +305,8 @@ impl LateLintPass for TypeComplexityPass {
|
||||
|
||||
fn check_impl_item(&mut self, cx: &LateContext, item: &ImplItem) {
|
||||
match item.node {
|
||||
ConstImplItem(ref ty, _) |
|
||||
TypeImplItem(ref ty) => check_type(cx, ty),
|
||||
ImplItemKind::Const(ref ty, _) |
|
||||
ImplItemKind::Type(ref ty) => check_type(cx, ty),
|
||||
// methods are covered by check_fn
|
||||
_ => ()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user