about summary refs log tree commit diff
path: root/compiler/rustc_lint/src/context.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_lint/src/context.rs')
-rw-r--r--compiler/rustc_lint/src/context.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_lint/src/context.rs b/compiler/rustc_lint/src/context.rs
index 1ed9b86d66c..eb1c6be48e6 100644
--- a/compiler/rustc_lint/src/context.rs
+++ b/compiler/rustc_lint/src/context.rs
@@ -1357,7 +1357,7 @@ impl<'tcx> LateContext<'tcx> {
             && let Some(init) = match parent_node {
                 hir::Node::Expr(expr) => Some(expr),
                 hir::Node::Local(hir::Local { init, .. }) => *init,
-                _ => None
+                _ => None,
             }
         {
             expr = init.peel_blocks();
@@ -1406,9 +1406,9 @@ impl<'tcx> LateContext<'tcx> {
                     hir::ItemKind::Const(.., body_id) | hir::ItemKind::Static(.., body_id) => {
                         Some(self.tcx.hir().body(body_id).value)
                     }
-                    _ => None
-                }
-                _ => None
+                    _ => None,
+                },
+                _ => None,
             }
         {
             expr = init.peel_blocks();