@@ -1067,14 +1067,11 @@ fn should_encode_mir(
10671067 // Full-fledged functions + closures
10681068 DefKind :: AssocFn | DefKind :: Fn | DefKind :: Closure => {
10691069 let generics = tcx. generics_of ( def_id) ;
1070- let mut opt = tcx. sess . opts . unstable_opts . always_encode_mir
1070+ let opt = tcx. sess . opts . unstable_opts . always_encode_mir
10711071 || ( tcx. sess . opts . output_types . should_codegen ( )
10721072 && reachable_set. contains ( & def_id)
10731073 && ( generics. requires_monomorphization ( tcx)
10741074 || tcx. cross_crate_inlinable ( def_id) ) ) ;
1075- if let Some ( intrinsic) = tcx. intrinsic ( def_id) {
1076- opt &= !intrinsic. must_be_overridden ;
1077- }
10781075 // The function has a `const` modifier or is in a `#[const_trait]`.
10791076 let is_const_fn = tcx. is_const_fn_raw ( def_id. to_def_id ( ) )
10801077 || tcx. is_const_default_method ( def_id. to_def_id ( ) ) ;
@@ -1704,10 +1701,8 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
17041701 {
17051702 for & local_def_id in tcx. mir_keys ( ( ) ) {
17061703 if let DefKind :: AssocFn | DefKind :: Fn = tcx. def_kind ( local_def_id) {
1707- if tcx. intrinsic ( local_def_id) . map_or ( true , |i| !i. must_be_overridden ) {
1708- record_array ! ( self . tables. deduced_param_attrs[ local_def_id. to_def_id( ) ] <-
1709- self . tcx. deduced_param_attrs( local_def_id. to_def_id( ) ) ) ;
1710- }
1704+ record_array ! ( self . tables. deduced_param_attrs[ local_def_id. to_def_id( ) ] <-
1705+ self . tcx. deduced_param_attrs( local_def_id. to_def_id( ) ) ) ;
17111706 }
17121707 }
17131708 }
0 commit comments