Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 8e4fe66

Browse files
olioli-obk
authored andcommitted
Require the encode_promoted_mir caller to know whether MIR for this item actually exists
1 parent 248b4db commit 8e4fe66

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

compiler/rustc_metadata/src/rmeta/encoder.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,9 +1138,7 @@ impl EncodeContext<'a, 'tcx> {
11381138

11391139
fn encode_promoted_mir(&mut self, def_id: LocalDefId) {
11401140
debug!("EncodeContext::encode_promoted_mir({:?})", def_id);
1141-
if self.tcx.mir_keys(LOCAL_CRATE).contains(&def_id) {
1142-
record!(self.tables.promoted_mir[def_id.to_def_id()] <- self.tcx.promoted_mir(def_id));
1143-
}
1141+
record!(self.tables.promoted_mir[def_id.to_def_id()] <- self.tcx.promoted_mir(def_id));
11441142
}
11451143

11461144
// Encodes the inherent implementations of a structure, enumeration, or trait.

0 commit comments

Comments
 (0)