diff options
| author | Michael Goulet <michael@errs.io> | 2024-03-21 17:11:06 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-03-22 11:13:29 -0400 |
| commit | c92b350581583c251dcd447f92fc20d362d34834 (patch) | |
| tree | 8700270c95eaf905f75324f9f45109f127ea1180 /clippy_lints/src/methods/zst_offset.rs | |
| parent | 0b810866ef8ffe4125f9c7aebb7d8b3792d2b7f1 (diff) | |
Programmatically convert some of the pat ctors
Diffstat (limited to 'clippy_lints/src/methods/zst_offset.rs')
| -rw-r--r-- | clippy_lints/src/methods/zst_offset.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/methods/zst_offset.rs b/clippy_lints/src/methods/zst_offset.rs index 0b829d99aef..d33021c2a7b 100644 --- a/clippy_lints/src/methods/zst_offset.rs +++ b/clippy_lints/src/methods/zst_offset.rs @@ -6,7 +6,7 @@ use rustc_middle::ty; use super::ZST_OFFSET; pub(super) fn check(cx: &LateContext<'_>, expr: &hir::Expr<'_>, recv: &hir::Expr<'_>) { - if let ty::RawPtr(ty::TypeAndMut { ty, .. }) = cx.typeck_results().expr_ty(recv).kind() + if let ty::RawPtr(ty, _) = cx.typeck_results().expr_ty(recv).kind() && let Ok(layout) = cx.tcx.layout_of(cx.param_env.and(*ty)) && layout.is_zst() { |
