From dc7143367c85f3f498d072ef4a2b8befdf1f75c0 Mon Sep 17 00:00:00 2001 From: Camille GILLOT Date: Sat, 16 Oct 2021 21:24:10 +0200 Subject: Drop has_params. --- compiler/rustc_query_system/src/dep_graph/dep_node.rs | 2 +- compiler/rustc_query_system/src/dep_graph/mod.rs | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'compiler/rustc_query_system/src') 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 DepNode { /// that the DepNode corresponding to the given DepKind actually /// does not require any parameters. pub fn new_no_params(kind: K) -> DepNode { - 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 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 /// 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, f: &mut fmt::Formatter<'_>) -> fmt::Result; -- cgit 1.4.1-3-g733a5