diff options
| author | bors <bors@rust-lang.org> | 2023-05-25 00:33:43 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-05-25 00:33:43 +0000 |
| commit | 7664dfe4331265d0b2b1ffb89c92d443886bec0b (patch) | |
| tree | 09c5b7ca62f2202c566ff9a70760ce4284646506 /compiler/rustc_codegen_cranelift/src/base.rs | |
| parent | 096309e6dc4378e175e524e963332d1a3830ed63 (diff) | |
| parent | 8038606bf32df8595811176e7299ef88133f9c92 (diff) | |
| download | rust-7664dfe4331265d0b2b1ffb89c92d443886bec0b.tar.gz rust-7664dfe4331265d0b2b1ffb89c92d443886bec0b.zip | |
Auto merge of #111925 - Manishearth:rollup-z6z6l2v, r=Manishearth
Rollup of 5 pull requests Successful merges: - #111741 (Use `ObligationCtxt` in custom type ops) - #111840 (Expose more information in `get_body_with_borrowck_facts`) - #111876 (Roll compiler_builtins to 0.1.92) - #111912 (Use `Option::is_some_and` and `Result::is_ok_and` in the compiler ) - #111915 (libtest: Improve error when missing `-Zunstable-options`) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/base.rs')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/base.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/base.rs b/compiler/rustc_codegen_cranelift/src/base.rs index 25fd5ca3ae8..9c6a0fae327 100644 --- a/compiler/rustc_codegen_cranelift/src/base.rs +++ b/compiler/rustc_codegen_cranelift/src/base.rs @@ -630,11 +630,11 @@ fn codegen_stmt<'tcx>( let to_ty = fx.monomorphize(to_ty); fn is_fat_ptr<'tcx>(fx: &FunctionCx<'_, '_, 'tcx>, ty: Ty<'tcx>) -> bool { - ty.builtin_deref(true) - .map(|ty::TypeAndMut { ty: pointee_ty, mutbl: _ }| { + ty.builtin_deref(true).is_some_and( + |ty::TypeAndMut { ty: pointee_ty, mutbl: _ }| { has_ptr_meta(fx.tcx, pointee_ty) - }) - .unwrap_or(false) + }, + ) } if is_fat_ptr(fx, from_ty) { |
