diff options
| author | oli <oli@uhura.edef.eu> | 2020-10-26 15:49:36 +0000 |
|---|---|---|
| committer | oli <github35764891676564198441@oli-obk.de> | 2021-01-04 21:40:38 +0000 |
| commit | 8e4fe6647f360f5175fd4984f3b5683606fe6879 (patch) | |
| tree | d4b555b9888d7208a415e33ecdc82809bf43761a | |
| parent | 248b4dbc4fcc03db855bbd2cfef88652a47c2010 (diff) | |
| download | rust-8e4fe6647f360f5175fd4984f3b5683606fe6879.tar.gz rust-8e4fe6647f360f5175fd4984f3b5683606fe6879.zip | |
Require the `encode_promoted_mir` caller to know whether MIR for this item actually exists
| -rw-r--r-- | compiler/rustc_metadata/src/rmeta/encoder.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_metadata/src/rmeta/encoder.rs b/compiler/rustc_metadata/src/rmeta/encoder.rs index 2774e817d3b..c0cd82eeab8 100644 --- a/compiler/rustc_metadata/src/rmeta/encoder.rs +++ b/compiler/rustc_metadata/src/rmeta/encoder.rs @@ -1138,9 +1138,7 @@ impl EncodeContext<'a, 'tcx> { fn encode_promoted_mir(&mut self, def_id: LocalDefId) { debug!("EncodeContext::encode_promoted_mir({:?})", def_id); - if self.tcx.mir_keys(LOCAL_CRATE).contains(&def_id) { - record!(self.tables.promoted_mir[def_id.to_def_id()] <- self.tcx.promoted_mir(def_id)); - } + record!(self.tables.promoted_mir[def_id.to_def_id()] <- self.tcx.promoted_mir(def_id)); } // Encodes the inherent implementations of a structure, enumeration, or trait. |
