File tree 2 files changed +8
-10
lines changed
2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -432,11 +432,9 @@ pub(crate) fn codegen_terminator_call<'tcx>(
432
432
let is_cold = if fn_sig. abi ( ) == Abi :: RustCold {
433
433
true
434
434
} else {
435
- instance
436
- . map ( |inst| {
437
- fx. tcx . codegen_fn_attrs ( inst. def_id ( ) ) . flags . contains ( CodegenFnAttrFlags :: COLD )
438
- } )
439
- . unwrap_or ( false )
435
+ instance. is_some_and ( |inst| {
436
+ fx. tcx . codegen_fn_attrs ( inst. def_id ( ) ) . flags . contains ( CodegenFnAttrFlags :: COLD )
437
+ } )
440
438
} ;
441
439
if is_cold {
442
440
fx. bcx . set_cold_block ( fx. bcx . current_block ( ) . unwrap ( ) ) ;
@@ -470,7 +468,7 @@ pub(crate) fn codegen_terminator_call<'tcx>(
470
468
} ;
471
469
472
470
// Pass the caller location for `#[track_caller]`.
473
- if instance. map ( |inst| inst. def . requires_caller_location ( fx. tcx ) ) . unwrap_or ( false ) {
471
+ if instance. is_some_and ( |inst| inst. def . requires_caller_location ( fx. tcx ) ) {
474
472
let caller_location = fx. get_caller_location ( source_info) ;
475
473
args. push ( CallArgument { value : caller_location, is_owned : false } ) ;
476
474
}
Original file line number Diff line number Diff line change @@ -630,11 +630,11 @@ fn codegen_stmt<'tcx>(
630
630
let to_ty = fx. monomorphize ( to_ty) ;
631
631
632
632
fn is_fat_ptr < ' tcx > ( fx : & FunctionCx < ' _ , ' _ , ' tcx > , ty : Ty < ' tcx > ) -> bool {
633
- ty. builtin_deref ( true )
634
- . map ( |ty:: TypeAndMut { ty : pointee_ty, mutbl : _ } | {
633
+ ty. builtin_deref ( true ) . is_some_and (
634
+ |ty:: TypeAndMut { ty : pointee_ty, mutbl : _ } | {
635
635
has_ptr_meta ( fx. tcx , pointee_ty)
636
- } )
637
- . unwrap_or ( false )
636
+ } ,
637
+ )
638
638
}
639
639
640
640
if is_fat_ptr ( fx, from_ty) {
You can’t perform that action at this time.
0 commit comments