Show a more informative panic message when DefPathHash
does not exist
This should hopefully make it easier to debug incremental compilation bugs like #93096 without affecting performance.
This commit is contained in:
parent
5e57faa78a
commit
70d36a05bc
4 changed files with 17 additions and 6 deletions
|
@ -761,7 +761,9 @@ impl<'a, 'tcx> Decodable<CacheDecoder<'a, 'tcx>> for DefId {
|
|||
// If we get to this point, then all of the query inputs were green,
|
||||
// which means that the definition with this hash is guaranteed to
|
||||
// still exist in the current compilation session.
|
||||
Ok(d.tcx().def_path_hash_to_def_id(def_path_hash))
|
||||
Ok(d.tcx().def_path_hash_to_def_id(def_path_hash, &mut || {
|
||||
panic!("Failed to convert DefPathHash {:?}", def_path_hash)
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue