diff options
| author | Michael Goulet <michael@errs.io> | 2023-10-13 08:58:33 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-10-13 08:59:36 +0000 |
| commit | b2d2184edea578109a48ec3d8decbee5948e8f35 (patch) | |
| tree | 84a351b1b08b838e0adcb1062ec04c344524e6c2 /compiler/rustc_lint/src/reference_casting.rs | |
| parent | 2763ca50da1192aa28295ef4dbe5d06443e1b90a (diff) | |
| download | rust-b2d2184edea578109a48ec3d8decbee5948e8f35.tar.gz rust-b2d2184edea578109a48ec3d8decbee5948e8f35.zip | |
Format all the let chains in compiler
Diffstat (limited to 'compiler/rustc_lint/src/reference_casting.rs')
| -rw-r--r-- | compiler/rustc_lint/src/reference_casting.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_lint/src/reference_casting.rs b/compiler/rustc_lint/src/reference_casting.rs index 0c52fbaf78c..d44691b5e9b 100644 --- a/compiler/rustc_lint/src/reference_casting.rs +++ b/compiler/rustc_lint/src/reference_casting.rs @@ -93,7 +93,10 @@ fn is_operation_we_care_about<'tcx>( if let ExprKind::Call(path, [arg_ptr, _arg_val]) = e.kind && let ExprKind::Path(ref qpath) = path.kind && let Some(def_id) = cx.qpath_res(qpath, path.hir_id).opt_def_id() - && matches!(cx.tcx.get_diagnostic_name(def_id), Some(sym::ptr_write | sym::ptr_write_volatile | sym::ptr_write_unaligned)) + && matches!( + cx.tcx.get_diagnostic_name(def_id), + Some(sym::ptr_write | sym::ptr_write_volatile | sym::ptr_write_unaligned) + ) { Some((true, arg_ptr)) } else { |
