@@ -1067,14 +1067,11 @@ fn should_encode_mir(
1067
1067
// Full-fledged functions + closures
1068
1068
DefKind :: AssocFn | DefKind :: Fn | DefKind :: Closure => {
1069
1069
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
1071
1071
|| ( tcx. sess . opts . output_types . should_codegen ( )
1072
1072
&& reachable_set. contains ( & def_id)
1073
1073
&& ( generics. requires_monomorphization ( tcx)
1074
1074
|| tcx. cross_crate_inlinable ( def_id) ) ) ;
1075
- if let Some ( intrinsic) = tcx. intrinsic ( def_id) {
1076
- opt &= !intrinsic. must_be_overridden ;
1077
- }
1078
1075
// The function has a `const` modifier or is in a `#[const_trait]`.
1079
1076
let is_const_fn = tcx. is_const_fn_raw ( def_id. to_def_id ( ) )
1080
1077
|| tcx. is_const_default_method ( def_id. to_def_id ( ) ) ;
@@ -1704,10 +1701,8 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
1704
1701
{
1705
1702
for & local_def_id in tcx. mir_keys ( ( ) ) {
1706
1703
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( ) ) ) ;
1711
1706
}
1712
1707
}
1713
1708
}
0 commit comments