diff options
| author | Philipp Krones <hello@philkrones.com> | 2024-06-13 12:18:48 +0200 |
|---|---|---|
| committer | Philipp Krones <hello@philkrones.com> | 2024-06-13 12:24:08 +0200 |
| commit | cc63143bbf5ae28daae127902090492560313ca1 (patch) | |
| tree | 3cf8901da2767e0e330b32ef8a1f8a3bf75adc0c /clippy_lints/src/missing_fields_in_debug.rs | |
| parent | 35f54fd439432f56c749fbb34f1326e34ed1fc42 (diff) | |
| parent | aaade2d12d3cf78fd9eb24bf7973e86433d6373d (diff) | |
Merge remote-tracking branch 'upstream/master' into rustup
Diffstat (limited to 'clippy_lints/src/missing_fields_in_debug.rs')
| -rw-r--r-- | clippy_lints/src/missing_fields_in_debug.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/missing_fields_in_debug.rs b/clippy_lints/src/missing_fields_in_debug.rs index a64faa124f0..77595b121aa 100644 --- a/clippy_lints/src/missing_fields_in_debug.rs +++ b/clippy_lints/src/missing_fields_in_debug.rs @@ -110,7 +110,7 @@ fn should_lint<'tcx>( // Is there a call to `DebugStruct::debug_struct`? Do lint if there is. let mut has_debug_struct = false; - for_each_expr(block, |expr| { + for_each_expr(cx, block, |expr| { if let ExprKind::MethodCall(path, recv, ..) = &expr.kind { let recv_ty = typeck_results.expr_ty(recv).peel_refs(); @@ -165,7 +165,7 @@ fn check_struct<'tcx>( let mut has_direct_field_access = false; let mut field_accesses = FxHashSet::default(); - for_each_expr(block, |expr| { + for_each_expr(cx, block, |expr| { if let ExprKind::Field(target, ident) = expr.kind && let target_ty = typeck_results.expr_ty_adjusted(target).peel_refs() && target_ty == self_ty |
