We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e0d89e5 commit 5b63d3fCopy full SHA for 5b63d3f
1 file changed
compiler/rustc_metadata/src/rmeta/encoder.rs
@@ -1113,11 +1113,10 @@ fn should_encode_mir(
1113
DefKind::SyntheticCoroutineBody => (false, true),
1114
// Full-fledged functions + closures
1115
DefKind::AssocFn | DefKind::Fn | DefKind::Closure => {
1116
- let generics = tcx.generics_of(def_id);
1117
let opt = tcx.sess.opts.unstable_opts.always_encode_mir
1118
|| (tcx.sess.opts.output_types.should_codegen()
1119
&& reachable_set.contains(&def_id)
1120
- && (generics.requires_monomorphization(tcx)
+ && (tcx.generics_of(def_id).requires_monomorphization(tcx)
1121
|| tcx.cross_crate_inlinable(def_id)));
1122
// The function has a `const` modifier or is in a `const trait`.
1123
let is_const_fn = tcx.is_const_fn(def_id.to_def_id());
0 commit comments