diff --git a/src/librustc/hir/map/collector.rs b/src/librustc/hir/map/collector.rs index a7d5cb6cbe3c..edb2e69b79ca 100644 --- a/src/librustc/hir/map/collector.rs +++ b/src/librustc/hir/map/collector.rs @@ -49,15 +49,12 @@ pub(super) struct NodeCollector<'a, 'hir> { hir_body_nodes: Vec<(DefPathHash, Fingerprint)>, } -fn input_dep_node_and_hash( +fn input_dep_node_and_hash( dep_graph: &DepGraph, hcx: &mut StableHashingContext<'_>, dep_node: DepNode, - input: I, -) -> (DepNodeIndex, Fingerprint) -where - I: for<'a> HashStable>, -{ + input: impl for<'a> HashStable>, +) -> (DepNodeIndex, Fingerprint) { let dep_node_index = dep_graph.input_task(dep_node, &mut *hcx, &input).1; let hash = if dep_graph.is_fully_enabled() { @@ -71,16 +68,13 @@ where (dep_node_index, hash) } -fn alloc_hir_dep_nodes( +fn alloc_hir_dep_nodes( dep_graph: &DepGraph, hcx: &mut StableHashingContext<'_>, def_path_hash: DefPathHash, - item_like: I, + item_like: impl for<'a> HashStable>, hir_body_nodes: &mut Vec<(DefPathHash, Fingerprint)>, -) -> (DepNodeIndex, DepNodeIndex) -where - I: for<'a> HashStable>, -{ +) -> (DepNodeIndex, DepNodeIndex) { let sig = dep_graph .input_task( def_path_hash.to_dep_node(DepKind::Hir),