diff options
| author | Yotam Ofek <yotam.ofek@gmail.com> | 2025-01-19 19:15:00 +0000 |
|---|---|---|
| committer | Yotam Ofek <yotam.ofek@gmail.com> | 2025-01-19 19:15:00 +0000 |
| commit | 264fa0fc5430f3a9a52a92df706d7c9ac5af4f85 (patch) | |
| tree | 0bbd37338339064a435083342483f5b6012f4694 /compiler/rustc_codegen_llvm/src/debuginfo | |
| parent | 39dc268459b4bd8b771e500169bea67850fad30d (diff) | |
| download | rust-264fa0fc5430f3a9a52a92df706d7c9ac5af4f85.tar.gz rust-264fa0fc5430f3a9a52a92df706d7c9ac5af4f85.zip | |
Run `clippy --fix` for `unnecessary_map_or` lint
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/debuginfo')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs b/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs index 88e43e1c678..8d782a618fc 100644 --- a/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs +++ b/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs @@ -442,7 +442,7 @@ pub(crate) fn type_di_node<'ll, 'tcx>(cx: &CodegenCx<'ll, 'tcx>, t: Ty<'tcx>) -> // (or if there is no allocator argument). ty::Adt(def, args) if def.is_box() - && args.get(1).map_or(true, |arg| cx.layout_of(arg.expect_ty()).is_1zst()) => + && args.get(1).is_none_or(|arg| cx.layout_of(arg.expect_ty()).is_1zst()) => { build_pointer_or_reference_di_node(cx, t, t.expect_boxed_ty(), unique_type_id) } |
