@@ -667,7 +667,7 @@ impl<'tcx> GotocCtx<'tcx> {
667
667
self . ensure_struct (
668
668
self . ty_mangled_name ( ty) ,
669
669
self . ty_pretty_name ( ty) ,
670
- |tcx, _| tcx. codegen_ty_tuple_fields ( ty, * ts) ,
670
+ |tcx, _| tcx. codegen_ty_tuple_fields ( ty, ts) ,
671
671
)
672
672
}
673
673
}
@@ -786,7 +786,7 @@ impl<'tcx> GotocCtx<'tcx> {
786
786
}
787
787
final_fields. extend ( self . codegen_alignment_padding (
788
788
offset,
789
- & layout,
789
+ layout,
790
790
final_fields. len ( ) ,
791
791
) ) ;
792
792
final_fields
@@ -991,7 +991,7 @@ impl<'tcx> GotocCtx<'tcx> {
991
991
let field_name = if Some ( idx) == discriminant_field {
992
992
"case" . into ( )
993
993
} else {
994
- ctx. generator_field_name ( idx) . into ( )
994
+ ctx. generator_field_name ( idx)
995
995
} ;
996
996
let field_ty = type_and_layout. field ( ctx, idx) . ty ;
997
997
let field_offset = type_and_layout. fields . offset ( idx) ;
@@ -1139,24 +1139,24 @@ impl<'tcx> GotocCtx<'tcx> {
1139
1139
let params = sig
1140
1140
. inputs ( )
1141
1141
. iter ( )
1142
- . filter_map ( |arg_type| {
1142
+ . map ( |arg_type| {
1143
1143
if is_first {
1144
1144
is_first = false ;
1145
1145
debug ! ( self_type=?arg_type, fn_signature=?sig, "codegen_dynamic_function_sig" ) ;
1146
1146
if arg_type. is_ref ( ) {
1147
1147
// Convert fat pointer to thin pointer to data portion.
1148
1148
let first_ty = pointee_type ( * arg_type) . unwrap ( ) ;
1149
- Some ( self . codegen_trait_data_pointer ( first_ty) )
1149
+ self . codegen_trait_data_pointer ( first_ty)
1150
1150
} else if arg_type. is_trait ( ) {
1151
1151
// Convert dyn T to thin pointer.
1152
- Some ( self . codegen_trait_data_pointer ( * arg_type) )
1152
+ self . codegen_trait_data_pointer ( * arg_type)
1153
1153
} else {
1154
1154
// Codegen type with thin pointer (E.g.: Box<dyn T> -> Box<data_ptr>).
1155
- Some ( self . codegen_trait_receiver ( * arg_type) )
1155
+ self . codegen_trait_receiver ( * arg_type)
1156
1156
}
1157
1157
} else {
1158
1158
debug ! ( "Using type {:?} in function signature" , arg_type) ;
1159
- Some ( self . codegen_ty ( * arg_type) )
1159
+ self . codegen_ty ( * arg_type)
1160
1160
}
1161
1161
} )
1162
1162
. collect ( ) ;
@@ -1404,7 +1404,7 @@ impl<'tcx> GotocCtx<'tcx> {
1404
1404
// fields.
1405
1405
Some (
1406
1406
lo. fields ( )
1407
- . offset ( lo. fields ( ) . index_by_increasing_offset ( ) . nth ( 0 ) . unwrap ( ) ) ,
1407
+ . offset ( lo. fields ( ) . index_by_increasing_offset ( ) . next ( ) . unwrap ( ) ) ,
1408
1408
)
1409
1409
}
1410
1410
} )
@@ -1700,7 +1700,7 @@ impl<'tcx> GotocCtx<'tcx> {
1700
1700
/// Pre-condition: The argument must be a valid receiver for dispatchable trait functions.
1701
1701
/// See <https://doc.rust-lang.org/reference/items/traits.html#object-safety> for more details.
1702
1702
pub fn receiver_data_path < ' a > (
1703
- self : & ' a Self ,
1703
+ & ' a self ,
1704
1704
typ : Ty < ' tcx > ,
1705
1705
) -> impl Iterator < Item = ( String , Ty < ' tcx > ) > + ' a {
1706
1706
struct ReceiverIter < ' tcx , ' a > {
0 commit comments