Inline DepNodeParams methods.
This commit is contained in:
parent
df71d0874a
commit
8785b70774
2 changed files with 18 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue