about summary refs log tree commit diff
path: root/compiler/rustc_query_system/src
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2021-10-16 21:24:10 +0200
committerCamille GILLOT <gillot.camille@gmail.com>2021-10-20 18:29:22 +0200
commitdc7143367c85f3f498d072ef4a2b8befdf1f75c0 (patch)
treeca696d9a2028e9d413c7b8960e8d0da536e7ec22 /compiler/rustc_query_system/src
parentaa404c24ddafea428cb86de8f914b129be4a726b (diff)
downloadrust-dc7143367c85f3f498d072ef4a2b8befdf1f75c0.tar.gz
rust-dc7143367c85f3f498d072ef4a2b8befdf1f75c0.zip
Drop has_params.
Diffstat (limited to 'compiler/rustc_query_system/src')
-rw-r--r--compiler/rustc_query_system/src/dep_graph/dep_node.rs2
-rw-r--r--compiler/rustc_query_system/src/dep_graph/mod.rs5
2 files changed, 2 insertions, 5 deletions
diff --git a/compiler/rustc_query_system/src/dep_graph/dep_node.rs b/compiler/rustc_query_system/src/dep_graph/dep_node.rs
index 8602219a7f3..4fb895716b2 100644
--- a/compiler/rustc_query_system/src/dep_graph/dep_node.rs
+++ b/compiler/rustc_query_system/src/dep_graph/dep_node.rs
@@ -61,7 +61,7 @@ impl<K: DepKind> DepNode<K> {
     /// that the DepNode corresponding to the given DepKind actually
     /// does not require any parameters.
     pub fn new_no_params(kind: K) -> DepNode<K> {
-        debug_assert!(!kind.has_params());
+        debug_assert_eq!(kind.fingerprint_style(), FingerprintStyle::Unit);
         DepNode { kind, hash: Fingerprint::ZERO.into() }
     }
 
diff --git a/compiler/rustc_query_system/src/dep_graph/mod.rs b/compiler/rustc_query_system/src/dep_graph/mod.rs
index dcda5728334..639038d008e 100644
--- a/compiler/rustc_query_system/src/dep_graph/mod.rs
+++ b/compiler/rustc_query_system/src/dep_graph/mod.rs
@@ -51,7 +51,7 @@ impl<T: DepContext> HasDepContext for T {
 }
 
 /// Describes the contents of the fingerprint generated by a given query.
-#[derive(PartialEq, Eq, Copy, Clone)]
+#[derive(Debug, PartialEq, Eq, Copy, Clone)]
 pub enum FingerprintStyle {
     /// The fingerprint is actually a DefPathHash.
     DefPathHash,
@@ -78,9 +78,6 @@ pub trait DepKind: Copy + fmt::Debug + Eq + Hash + Send + Encodable<FileEncoder>
     /// Return whether this kind always require evaluation.
     fn is_eval_always(&self) -> bool;
 
-    /// Return whether this kind requires additional parameters to be executed.
-    fn has_params(&self) -> bool;
-
     /// Implementation of `std::fmt::Debug` for `DepNode`.
     fn debug_node(node: &DepNode<Self>, f: &mut fmt::Formatter<'_>) -> fmt::Result;