@@ -1065,14 +1065,11 @@ fn should_encode_mir(
10651065 // Full-fledged functions + closures
10661066 DefKind :: AssocFn | DefKind :: Fn | DefKind :: Closure => {
10671067 let generics = tcx. generics_of ( def_id) ;
1068- let mut opt = tcx. sess . opts . unstable_opts . always_encode_mir
1068+ let opt = tcx. sess . opts . unstable_opts . always_encode_mir
10691069 || ( tcx. sess . opts . output_types . should_codegen ( )
10701070 && reachable_set. contains ( & def_id)
10711071 && ( generics. requires_monomorphization ( tcx)
10721072 || tcx. cross_crate_inlinable ( def_id) ) ) ;
1073- if let Some ( intrinsic) = tcx. intrinsic ( def_id) {
1074- opt &= !intrinsic. must_be_overridden ;
1075- }
10761073 // The function has a `const` modifier or is in a `#[const_trait]`.
10771074 let is_const_fn = tcx. is_const_fn_raw ( def_id. to_def_id ( ) )
10781075 || tcx. is_const_default_method ( def_id. to_def_id ( ) ) ;
@@ -1701,10 +1698,8 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
17011698 {
17021699 for & local_def_id in tcx. mir_keys ( ( ) ) {
17031700 if let DefKind :: AssocFn | DefKind :: Fn = tcx. def_kind ( local_def_id) {
1704- if tcx. intrinsic ( local_def_id) . map_or ( true , |i| !i. must_be_overridden ) {
1705- record_array ! ( self . tables. deduced_param_attrs[ local_def_id. to_def_id( ) ] <-
1706- self . tcx. deduced_param_attrs( local_def_id. to_def_id( ) ) ) ;
1707- }
1701+ record_array ! ( self . tables. deduced_param_attrs[ local_def_id. to_def_id( ) ] <-
1702+ self . tcx. deduced_param_attrs( local_def_id. to_def_id( ) ) ) ;
17081703 }
17091704 }
17101705 }
0 commit comments