about summary refs log tree commit diff
path: root/clippy_lints/src/mutable_debug_assertion.rs
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2019-12-27 16:12:26 +0900
committerYuki Okushi <huyuumi.dev@gmail.com>2019-12-27 16:13:53 +0900
commite2636729ec6f1c9ba4e071699488d1089756c7c6 (patch)
tree6db1d892d4187d4bea58d8ecc783fe594c2eefca /clippy_lints/src/mutable_debug_assertion.rs
parentb0c4744d57365e051ba3480dc0eed2540735097e (diff)
downloadrust-e2636729ec6f1c9ba4e071699488d1089756c7c6.tar.gz
rust-e2636729ec6f1c9ba4e071699488d1089756c7c6.zip
Rustup to rust-lang/rust#66936
Diffstat (limited to 'clippy_lints/src/mutable_debug_assertion.rs')
-rw-r--r--clippy_lints/src/mutable_debug_assertion.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/clippy_lints/src/mutable_debug_assertion.rs b/clippy_lints/src/mutable_debug_assertion.rs
index 99815301010..5844de136b9 100644
--- a/clippy_lints/src/mutable_debug_assertion.rs
+++ b/clippy_lints/src/mutable_debug_assertion.rs
@@ -36,7 +36,7 @@ declare_lint_pass!(DebugAssertWithMutCall => [DEBUG_ASSERT_WITH_MUT_CALL]);
 const DEBUG_MACRO_NAMES: [&str; 3] = ["debug_assert", "debug_assert_eq", "debug_assert_ne"];
 
 impl<'a, 'tcx> LateLintPass<'a, 'tcx> for DebugAssertWithMutCall {
-    fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, e: &'tcx Expr) {
+    fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, e: &'tcx Expr<'_>) {
         for dmn in &DEBUG_MACRO_NAMES {
             if is_direct_expn_of(e.span, dmn).is_some() {
                 if let Some(span) = extract_call(cx, e) {
@@ -54,7 +54,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for DebugAssertWithMutCall {
 
 //HACK(hellow554): remove this when #4694 is implemented
 #[allow(clippy::cognitive_complexity)]
-fn extract_call<'a, 'tcx>(cx: &'a LateContext<'a, 'tcx>, e: &'tcx Expr) -> Option<Span> {
+fn extract_call<'a, 'tcx>(cx: &'a LateContext<'a, 'tcx>, e: &'tcx Expr<'_>) -> Option<Span> {
     if_chain! {
         if let ExprKind::Block(ref block, _) = e.kind;
         if block.stmts.len() == 1;
@@ -127,7 +127,7 @@ impl<'a, 'tcx> MutArgVisitor<'a, 'tcx> {
 }
 
 impl<'a, 'tcx> Visitor<'tcx> for MutArgVisitor<'a, 'tcx> {
-    fn visit_expr(&mut self, expr: &'tcx Expr) {
+    fn visit_expr(&mut self, expr: &'tcx Expr<'_>) {
         match expr.kind {
             ExprKind::AddrOf(BorrowKind::Ref, Mutability::Mut, _) => {
                 self.found = true;