]> git.lizzy.rs Git - rust.git/commitdiff
Rustup
authorOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>
Fri, 28 Apr 2017 11:00:42 +0000 (13:00 +0200)
committerOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>
Fri, 28 Apr 2017 11:00:42 +0000 (13:00 +0200)
clippy_lints/src/assign_ops.rs
clippy_lints/src/derive.rs
clippy_lints/src/functions.rs
clippy_lints/src/len_zero.rs
clippy_lints/src/methods.rs
clippy_lints/src/partialeq_ne_impl.rs
clippy_lints/src/print.rs
clippy_lints/src/ptr.rs
clippy_lints/src/serde.rs
clippy_lints/src/types.rs
clippy_lints/src/utils/inspector.rs

index ea3e29cff122fc20760afc0432a235e958dd9e19..3432ce59c7d1a2654860386bbad55517ee84577f 100644 (file)
@@ -149,7 +149,7 @@ macro_rules! ops {
                                         if_let_chain!{[
                                             parent_impl != ast::CRATE_NODE_ID,
                                             let hir::map::Node::NodeItem(item) = cx.tcx.hir.get(parent_impl),
-                                            let hir::Item_::ItemImpl(_, _, _, Some(ref trait_ref), _, _) = item.node,
+                                            let hir::Item_::ItemImpl(_, _, _, _, Some(ref trait_ref), _, _) = item.node,
                                             trait_ref.path.def.def_id() == trait_id
                                         ], { return; }}
                                         implements_trait($cx, $ty, trait_id, &[$rty], None)
index efbc7c65ff0ceea1e556d367d55e300ac82d8a9d..dc1747fd3eb72b5fa587dc8ba01ecf26be650d74 100644 (file)
@@ -72,7 +72,7 @@ fn get_lints(&self) -> LintArray {
 
 impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Derive {
     fn check_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx Item) {
-        if let ItemImpl(_, _, _, Some(ref trait_ref), _, _) = item.node {
+        if let ItemImpl(_, _, _, _, Some(ref trait_ref), _, _) = item.node {
             let ty = cx.tcx.type_of(cx.tcx.hir.local_def_id(item.id));
             let is_automatically_derived = is_automatically_derived(&*item.attrs);
 
index 6d630c7cc8891fd0daf1a3b01b52bc7b9865fce2..58d49c6fd238cf9966fc69a8578b2c1efa7b4d4e 100644 (file)
@@ -81,7 +81,7 @@ fn check_fn(
         use rustc::hir::map::Node::*;
 
         let is_impl = if let Some(NodeItem(item)) = cx.tcx.hir.find(cx.tcx.hir.get_parent_node(nodeid)) {
-            matches!(item.node, hir::ItemImpl(_, _, _, Some(_), _, _) | hir::ItemDefaultImpl(..))
+            matches!(item.node, hir::ItemImpl(_, _, _, _, Some(_), _, _) | hir::ItemDefaultImpl(..))
         } else {
             false
         };
index 49051da12bbacf72d95e787ec9008e61c17aad06..e275787935e0d87b741b8803911ed43f6cd4f78f 100644 (file)
@@ -67,7 +67,7 @@ fn check_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx Item) {
 
         match item.node {
             ItemTrait(_, _, _, ref trait_items) => check_trait_items(cx, item, trait_items),
-            ItemImpl(_, _, _, None, _, ref impl_items) => check_impl_items(cx, item, impl_items),
+            ItemImpl(_, _, _, _, None, _, ref impl_items) => check_impl_items(cx, item, impl_items),
             _ => (),
         }
     }
index ced769e606af000f1a12fcac35931e8131df5e1c..7e1acd8b673163b14182f842f292676fc82d88d8 100644 (file)
@@ -642,7 +642,7 @@ fn check_impl_item(&mut self, cx: &LateContext<'a, 'tcx>, implitem: &'tcx hir::I
             let hir::ImplItemKind::Method(ref sig, id) = implitem.node,
             let Some(first_arg_ty) = sig.decl.inputs.get(0),
             let Some(first_arg) = iter_input_pats(&sig.decl, cx.tcx.hir.body(id)).next(),
-            let hir::ItemImpl(_, _, _, None, ref self_ty, _) = item.node,
+            let hir::ItemImpl(_, _, _, _, None, ref self_ty, _) = item.node,
         ], {
             // check missing trait implementations
             for &(method_name, n_args, self_kind, out_type, trait_name) in &TRAIT_METHODS {
index 5fee08a0c498ddf4cfd6fdee981d87edfee509ab..64b58b6e2774769c21dac0151bd27cee29f6cc02 100644 (file)
@@ -38,7 +38,7 @@ fn get_lints(&self) -> LintArray {
 impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
     fn check_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx Item) {
         if_let_chain! {[
-            let ItemImpl(_, _, _, Some(ref trait_ref), _, ref impl_items) = item.node,
+            let ItemImpl(_, _, _, _, Some(ref trait_ref), _, ref impl_items) = item.node,
             !is_automatically_derived(&*item.attrs),
             let Some(eq_trait) = cx.tcx.lang_items.eq_trait(),
             trait_ref.path.def.def_id() == eq_trait
index a6eb5c5dfda92748c6928ce540642a1d1080bb90..a7f498af5c21f389543611021e99c9aac4303a70 100644 (file)
@@ -141,7 +141,7 @@ fn is_in_debug_impl(cx: &LateContext, expr: &Expr) -> bool {
     if let Some(NodeImplItem(item)) = map.find(map.get_parent(expr.id)) {
         // `Debug` impl
         if let Some(NodeItem(item)) = map.find(map.get_parent(item.id)) {
-            if let ItemImpl(_, _, _, Some(ref tr), _, _) = item.node {
+            if let ItemImpl(_, _, _, _, Some(ref tr), _, _) = item.node {
                 return match_path_old(&tr.path, &["Debug"]);
             }
         }
index c3c35c17bdb96e476eb7bc5f80f183102158d21f..c4cd1b4bab0ea608e330b640854d5d7fd8f9da98 100644 (file)
@@ -85,7 +85,7 @@ fn check_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx Item) {
     fn check_impl_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx ImplItem) {
         if let ImplItemKind::Method(ref sig, _) = item.node {
             if let Some(NodeItem(it)) = cx.tcx.hir.find(cx.tcx.hir.get_parent(item.id)) {
-                if let ItemImpl(_, _, _, Some(_), _, _) = it.node {
+                if let ItemImpl(_, _, _, _, Some(_), _, _) = it.node {
                     return; // ignore trait impls
                 }
             }
index 02faf7a204fb3f5279ade4a88990713fd960ae45..df803473a2a588e1a6d1a43e751973f85cfeba2e 100644 (file)
@@ -28,7 +28,7 @@ fn get_lints(&self) -> LintArray {
 
 impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Serde {
     fn check_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx Item) {
-        if let ItemImpl(_, _, _, Some(ref trait_ref), _, ref items) = item.node {
+        if let ItemImpl(_, _, _, _, Some(ref trait_ref), _, ref items) = item.node {
             let did = trait_ref.path.def.def_id();
             if let Some(visit_did) = get_trait_def_id(cx, &paths::SERDE_DE_VISITOR) {
                 if did == visit_did {
index 005c508f123e5595d7388547bf6eca4991e0224f..0c9497752dbd54ce1720fa9b8ced4afc47e9fe12 100644 (file)
@@ -74,7 +74,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TypePass {
     fn check_fn(&mut self, cx: &LateContext, _: FnKind, decl: &FnDecl, _: &Body, _: Span, id: NodeId) {
         // skip trait implementations, see #605
         if let Some(map::NodeItem(item)) = cx.tcx.hir.find(cx.tcx.hir.get_parent(id)) {
-            if let ItemImpl(_, _, _, Some(..), _, _) = item.node {
+            if let ItemImpl(_, _, _, _, Some(..), _, _) = item.node {
                 return;
             }
         }
index bd5cdbc47db7c6929df4fafed1412a9593d8d44c..4a4ddf5f3fc2ea816c771840a0fc9324bb543185 100644 (file)
@@ -396,10 +396,10 @@ fn print_item(cx: &LateContext, item: &hir::Item) {
         hir::ItemDefaultImpl(_, ref _trait_ref) => {
             println!("default impl");
         },
-        hir::ItemImpl(_, _, _, Some(ref _trait_ref), _, _) => {
+        hir::ItemImpl(_, _, _, _, Some(ref _trait_ref), _, _) => {
             println!("trait impl");
         },
-        hir::ItemImpl(_, _, _, None, _, _) => {
+        hir::ItemImpl(_, _, _, _, None, _, _) => {
             println!("impl");
         },
     }