Auto merge of #85829 - bjorn3:simplify_crate_num, r=jackh726
Remove CrateNum::ReservedForIncrCompCache It's only use is easily replaceable with `Option<CrateNum>`.
This commit is contained in:
commit
625d5a693e
7 changed files with 12 additions and 71 deletions
|
@ -269,7 +269,7 @@ pub struct CrateVariancesMap<'tcx> {
|
|||
// the types of AST nodes.
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct CReaderCacheKey {
|
||||
pub cnum: CrateNum,
|
||||
pub cnum: Option<CrateNum>,
|
||||
pub pos: usize,
|
||||
}
|
||||
|
||||
|
|
|
@ -755,8 +755,7 @@ impl<'a, 'tcx> TyDecoder<'tcx> for CacheDecoder<'a, 'tcx> {
|
|||
{
|
||||
let tcx = self.tcx();
|
||||
|
||||
let cache_key =
|
||||
ty::CReaderCacheKey { cnum: CrateNum::ReservedForIncrCompCache, pos: shorthand };
|
||||
let cache_key = ty::CReaderCacheKey { cnum: None, pos: shorthand };
|
||||
|
||||
if let Some(&ty) = tcx.ty_rcache.borrow().get(&cache_key) {
|
||||
return Ok(ty);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue