Auto merge of #85834 - cjgillot:save-sbi, r=michaelwoerister
Encode CrateNum using the StableCrateId for incr. comp.
This commit is contained in:
commit
b17d9c1332
4 changed files with 40 additions and 71 deletions
|
@ -252,6 +252,10 @@ impl<'a, 'tcx> DecodeContext<'a, 'tcx> {
|
|||
self.cdata.expect("missing CrateMetadata in DecodeContext")
|
||||
}
|
||||
|
||||
fn map_encoded_cnum_to_current(&self, cnum: CrateNum) -> CrateNum {
|
||||
if cnum == LOCAL_CRATE { self.cdata().cnum } else { self.cdata().cnum_map[cnum] }
|
||||
}
|
||||
|
||||
fn read_lazy_with_meta<T: ?Sized + LazyMeta>(
|
||||
&mut self,
|
||||
meta: T::Meta,
|
||||
|
@ -324,10 +328,6 @@ impl<'a, 'tcx> TyDecoder<'tcx> for DecodeContext<'a, 'tcx> {
|
|||
r
|
||||
}
|
||||
|
||||
fn map_encoded_cnum_to_current(&self, cnum: CrateNum) -> CrateNum {
|
||||
if cnum == LOCAL_CRATE { self.cdata().cnum } else { self.cdata().cnum_map[cnum] }
|
||||
}
|
||||
|
||||
fn decode_alloc_id(&mut self) -> Result<rustc_middle::mir::interpret::AllocId, Self::Error> {
|
||||
if let Some(alloc_decoding_session) = self.alloc_decoding_session {
|
||||
alloc_decoding_session.decode_alloc_id(self)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue