]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_middle/src/dep_graph/mod.rs
Rollup merge of #98789 - aDotInTheVoid:rjdt-derives, r=jsha
[rust.git] / compiler / rustc_middle / src / dep_graph / mod.rs
index e335cb395f84f3b9d4305975cd7835e37928d621..c8b3b52b0fb2bd7d6467f626f173dc494d76fbb7 100644 (file)
@@ -23,6 +23,7 @@
 
 impl rustc_query_system::dep_graph::DepKind for DepKind {
     const NULL: Self = DepKind::Null;
+    const RED: Self = DepKind::Red;
 
     fn debug_node(node: &DepNode, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         write!(f, "{:?}(", node.kind)?;
@@ -71,8 +72,8 @@ impl<'tcx> DepContext for TyCtxt<'tcx> {
     type DepKind = DepKind;
 
     #[inline]
-    fn create_stable_hashing_context(&self) -> StableHashingContext<'_> {
-        TyCtxt::create_stable_hashing_context(*self)
+    fn with_stable_hashing_context<R>(&self, f: impl FnOnce(StableHashingContext<'_>) -> R) -> R {
+        TyCtxt::with_stable_hashing_context(*self, f)
     }
 
     #[inline]