1
Fork 0

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:
bors 2021-01-26 05:47:23 +00:00
commit a8f7075532
23 changed files with 46 additions and 34 deletions

View file

@ -66,7 +66,7 @@ fn handle_errors(sess: &ParseSess, span: Span, error: AttrError) {
}
}
#[derive(Copy, Clone, PartialEq, Encodable, Decodable)]
#[derive(Copy, Clone, PartialEq, Encodable, Decodable, Debug)]
pub enum InlineAttr {
None,
Hint,
@ -74,13 +74,13 @@ pub enum InlineAttr {
Never,
}
#[derive(Clone, Encodable, Decodable)]
#[derive(Clone, Encodable, Decodable, Debug)]
pub enum InstructionSetAttr {
ArmA32,
ArmT32,
}
#[derive(Clone, Encodable, Decodable)]
#[derive(Clone, Encodable, Decodable, Debug)]
pub enum OptimizeAttr {
None,
Speed,