Require the encode_promoted_mir
caller to know whether MIR for this item actually exists
This commit is contained in:
parent
248b4dbc4f
commit
8e4fe6647f
1 changed files with 1 additions and 3 deletions
|
@ -1138,9 +1138,7 @@ impl EncodeContext<'a, 'tcx> {
|
||||||
|
|
||||||
fn encode_promoted_mir(&mut self, def_id: LocalDefId) {
|
fn encode_promoted_mir(&mut self, def_id: LocalDefId) {
|
||||||
debug!("EncodeContext::encode_promoted_mir({:?})", def_id);
|
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.
|
// Encodes the inherent implementations of a structure, enumeration, or trait.
|
||||||
|
|
Loading…
Add table
Reference in a new issue