Auto merge of #80692 - Aaron1011:feature/query-result-debug, r=estebank
Enforce that query results implement Debug Currently, we require that query keys implement `Debug`, but we do not do the same for query values. This can make incremental compilation bugs difficult to debug - there isn't a good place to print out the result loaded from disk. This PR adds `Debug` bounds to several query-related functions, allowing us to debug-print the query value when an 'unstable fingerprint' error occurs. This required adding `#[derive(Debug)]` to a fairly large number of types - hopefully, this doesn't have much of an impact on compiler bootstrapping times.
This commit is contained in:
commit
a8f7075532
23 changed files with 46 additions and 34 deletions
|
@ -552,6 +552,7 @@ pub fn hash_stable_hashmap<HCX, K, V, R, SK, F>(
|
|||
|
||||
/// A vector container that makes sure that its items are hashed in a stable
|
||||
/// order.
|
||||
#[derive(Debug)]
|
||||
pub struct StableVec<T>(Vec<T>);
|
||||
|
||||
impl<T> StableVec<T> {
|
||||
|
|
|
@ -21,6 +21,7 @@ use crate::sync::{MappedReadGuard, ReadGuard, RwLock};
|
|||
/// -- once the value is stolen -- it will never be read from again.
|
||||
//
|
||||
// FIXME(#41710): what is the best way to model linear queries?
|
||||
#[derive(Debug)]
|
||||
pub struct Steal<T> {
|
||||
value: RwLock<Option<T>>,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue