about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLzu Tao <taolzu@gmail.com>2024-06-22 06:21:35 +0700
committerLzu Tao <taolzu@gmail.com>2024-07-03 21:09:58 +0700
commit388de386f5ecbbb0eb7a164fe1fa702db2fa4328 (patch)
treee7cd00952cb5cbeb36b67b4f71620a67b977f6a7
parent7b76b947800bac94d041aaf8156450c8e7289da9 (diff)
downloadrust-388de386f5ecbbb0eb7a164fe1fa702db2fa4328.tar.gz
rust-388de386f5ecbbb0eb7a164fe1fa702db2fa4328.zip
Make it easier to print debugging with Debug
-rw-r--r--clippy_lints/src/dereference.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/clippy_lints/src/dereference.rs b/clippy_lints/src/dereference.rs
index 3c137b6b70f..4c1ca75e0db 100644
--- a/clippy_lints/src/dereference.rs
+++ b/clippy_lints/src/dereference.rs
@@ -175,6 +175,7 @@ struct StateData<'tcx> {
     adjusted_ty: Ty<'tcx>,
 }
 
+#[derive(Debug)]
 struct DerefedBorrow {
     count: usize,
     msg: &'static str,
@@ -182,6 +183,7 @@ struct DerefedBorrow {
     for_field_access: Option<Symbol>,
 }
 
+#[derive(Debug)]
 enum State {
     // Any number of deref method calls.
     DerefMethod {
@@ -744,7 +746,7 @@ fn in_postfix_position<'tcx>(cx: &LateContext<'tcx>, e: &'tcx Expr<'tcx>) -> boo
     }
 }
 
-#[derive(Clone, Copy)]
+#[derive(Clone, Copy, Debug)]
 enum TyCoercionStability {
     Deref,
     Reborrow,