Allow query system to recover a HirId.
This commit is contained in:
parent
744e397d88
commit
6019cbbfd3
2 changed files with 37 additions and 7 deletions
|
@ -94,6 +94,8 @@ impl<T: DepContext> HasDepContext for T {
|
|||
pub enum FingerprintStyle {
|
||||
/// The fingerprint is actually a DefPathHash.
|
||||
DefPathHash,
|
||||
/// The fingerprint is actually a HirId.
|
||||
HirId,
|
||||
/// Query key was `()` or equivalent, so fingerprint is just zero.
|
||||
Unit,
|
||||
/// Some opaque hash.
|
||||
|
@ -104,7 +106,9 @@ impl FingerprintStyle {
|
|||
#[inline]
|
||||
pub fn reconstructible(self) -> bool {
|
||||
match self {
|
||||
FingerprintStyle::DefPathHash | FingerprintStyle::Unit => true,
|
||||
FingerprintStyle::DefPathHash | FingerprintStyle::Unit | FingerprintStyle::HirId => {
|
||||
true
|
||||
}
|
||||
FingerprintStyle::Opaque => false,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue