File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed
compiler/rustc_metadata/src/rmeta Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -1113,11 +1113,10 @@ fn should_encode_mir(
11131113 DefKind :: SyntheticCoroutineBody => ( false , true ) ,
11141114 // Full-fledged functions + closures
11151115 DefKind :: AssocFn | DefKind :: Fn | DefKind :: Closure => {
1116- let generics = tcx. generics_of ( def_id) ;
11171116 let opt = tcx. sess . opts . unstable_opts . always_encode_mir
11181117 || ( tcx. sess . opts . output_types . should_codegen ( )
11191118 && reachable_set. contains ( & def_id)
1120- && ( generics . requires_monomorphization ( tcx)
1119+ && ( tcx . generics_of ( def_id ) . requires_monomorphization ( tcx)
11211120 || tcx. cross_crate_inlinable ( def_id) ) ) ;
11221121 // The function has a `const` modifier or is in a `const trait`.
11231122 let is_const_fn = tcx. is_const_fn ( def_id. to_def_id ( ) ) ;
You can’t perform that action at this time.
0 commit comments