1
Fork 0

Inline DepNodeParams methods.

This commit is contained in:
Camille GILLOT 2021-10-17 11:49:30 +02:00
parent df71d0874a
commit 8785b70774
2 changed files with 18 additions and 1 deletions

View file

@ -124,11 +124,12 @@ impl<Ctxt: DepContext, T> DepNodeParams<Ctxt> for T
where
T: for<'a> HashStable<StableHashingContext<'a>> + fmt::Debug,
{
#[inline]
#[inline(always)]
default fn fingerprint_style() -> FingerprintStyle {
FingerprintStyle::Opaque
}
#[inline(always)]
default fn to_fingerprint(&self, tcx: Ctxt) -> Fingerprint {
let mut hcx = tcx.create_stable_hashing_context();
let mut hasher = StableHasher::new();
@ -138,10 +139,12 @@ where
hasher.finish()
}
#[inline(always)]
default fn to_debug_str(&self, _: Ctxt) -> String {
format!("{:?}", *self)
}
#[inline(always)]
default fn recover(_: Ctxt, _: &DepNode<Ctxt::DepKind>) -> Option<Self> {
None
}