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