diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2021-02-03 14:29:18 +0100 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2021-02-03 14:29:18 +0100 |
| commit | 0658d8c097175dc90c09e232db910139c79b0e5a (patch) | |
| tree | a0a30ee5f5bda0b1878054a211cb95a050b5fd77 | |
| parent | 5a60f0a86f2065742a1a70cd38fdc63fc1b95c61 (diff) | |
| download | rust-0658d8c097175dc90c09e232db910139c79b0e5a.tar.gz rust-0658d8c097175dc90c09e232db910139c79b0e5a.zip | |
Address review.
| -rw-r--r-- | compiler/rustc_metadata/src/rmeta/encoder.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/compiler/rustc_metadata/src/rmeta/encoder.rs b/compiler/rustc_metadata/src/rmeta/encoder.rs index 8b9f10bf284..a0bb4e93ba4 100644 --- a/compiler/rustc_metadata/src/rmeta/encoder.rs +++ b/compiler/rustc_metadata/src/rmeta/encoder.rs @@ -810,14 +810,10 @@ fn should_encode_mir(tcx: TyCtxt<'_>, def_id: LocalDefId) -> (bool, bool) { // Only check the presence of the `const` modifier. let is_const_fn = tcx.is_const_fn_raw(def_id.to_def_id()); let always_encode_mir = tcx.sess.opts.debugging_opts.always_encode_mir; - (is_const_fn, needs_inline || is_const_fn || always_encode_mir) + (is_const_fn, needs_inline || always_encode_mir) } // Generators require optimized MIR to compute layout. - DefKind::Generator => { - // Only check the presence of the `const` modifier. - let is_const_fn = tcx.is_const_fn_raw(def_id.to_def_id()); - (is_const_fn, true) - } + DefKind::Generator => (false, true), // The others don't have MIR. _ => (false, false), } |
