diff options
| author | Lzu Tao <taolzu@gmail.com> | 2024-06-22 06:21:35 +0700 |
|---|---|---|
| committer | Lzu Tao <taolzu@gmail.com> | 2024-07-03 21:09:58 +0700 |
| commit | 388de386f5ecbbb0eb7a164fe1fa702db2fa4328 (patch) | |
| tree | e7cd00952cb5cbeb36b67b4f71620a67b977f6a7 | |
| parent | 7b76b947800bac94d041aaf8156450c8e7289da9 (diff) | |
| download | rust-388de386f5ecbbb0eb7a164fe1fa702db2fa4328.tar.gz rust-388de386f5ecbbb0eb7a164fe1fa702db2fa4328.zip | |
Make it easier to print debugging with Debug
| -rw-r--r-- | clippy_lints/src/dereference.rs | 4 |
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, |
