Skip to content

Commit 0658d8c

Browse files
committed
Address review.
1 parent 5a60f0a commit 0658d8c

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

compiler/rustc_metadata/src/rmeta/encoder.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -810,14 +810,10 @@ fn should_encode_mir(tcx: TyCtxt<'_>, def_id: LocalDefId) -> (bool, bool) {
810810
// Only check the presence of the `const` modifier.
811811
let is_const_fn = tcx.is_const_fn_raw(def_id.to_def_id());
812812
let always_encode_mir = tcx.sess.opts.debugging_opts.always_encode_mir;
813-
(is_const_fn, needs_inline || is_const_fn || always_encode_mir)
813+
(is_const_fn, needs_inline || always_encode_mir)
814814
}
815815
// Generators require optimized MIR to compute layout.
816-
DefKind::Generator => {
817-
// Only check the presence of the `const` modifier.
818-
let is_const_fn = tcx.is_const_fn_raw(def_id.to_def_id());
819-
(is_const_fn, true)
820-
}
816+
DefKind::Generator => (false, true),
821817
// The others don't have MIR.
822818
_ => (false, false),
823819
}

0 commit comments

Comments
 (0)