Skip to content

Commit 3eb83f2

Browse files
committed
collector: use impl Trait
1 parent adaa521 commit 3eb83f2

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

src/librustc/hir/map/collector.rs

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,12 @@ pub(super) struct NodeCollector<'a, 'hir> {
4949
hir_body_nodes: Vec<(DefPathHash, Fingerprint)>,
5050
}
5151

52-
fn input_dep_node_and_hash<I>(
52+
fn input_dep_node_and_hash(
5353
dep_graph: &DepGraph,
5454
hcx: &mut StableHashingContext<'_>,
5555
dep_node: DepNode,
56-
input: I,
57-
) -> (DepNodeIndex, Fingerprint)
58-
where
59-
I: for<'a> HashStable<StableHashingContext<'a>>,
60-
{
56+
input: impl for<'a> HashStable<StableHashingContext<'a>>,
57+
) -> (DepNodeIndex, Fingerprint) {
6158
let dep_node_index = dep_graph.input_task(dep_node, &mut *hcx, &input).1;
6259

6360
let hash = if dep_graph.is_fully_enabled() {
@@ -71,16 +68,13 @@ where
7168
(dep_node_index, hash)
7269
}
7370

74-
fn alloc_hir_dep_nodes<I>(
71+
fn alloc_hir_dep_nodes(
7572
dep_graph: &DepGraph,
7673
hcx: &mut StableHashingContext<'_>,
7774
def_path_hash: DefPathHash,
78-
item_like: I,
75+
item_like: impl for<'a> HashStable<StableHashingContext<'a>>,
7976
hir_body_nodes: &mut Vec<(DefPathHash, Fingerprint)>,
80-
) -> (DepNodeIndex, DepNodeIndex)
81-
where
82-
I: for<'a> HashStable<StableHashingContext<'a>>,
83-
{
77+
) -> (DepNodeIndex, DepNodeIndex) {
8478
let sig = dep_graph
8579
.input_task(
8680
def_path_hash.to_dep_node(DepKind::Hir),

0 commit comments

Comments
 (0)