Skip to content

Commit 2529b73

Browse files
committed
adopt new header style to sidestep rust-lang/rustfmt#836
1 parent 43dc48c commit 2529b73

File tree

2 files changed

+9
-15
lines changed

2 files changed

+9
-15
lines changed

src/librustc_data_structures/graph/mod.rs

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,7 @@ impl<N: Debug, E: Debug> Graph<N, E> {
121121
}
122122
}
123123

124-
///////////////////////////////////////////////////////////////////////////
125-
// Simple accessors
124+
// # Simple accessors
126125

127126
#[inline]
128127
pub fn all_nodes(&self) -> &[Node<N>] {
@@ -144,8 +143,7 @@ impl<N: Debug, E: Debug> Graph<N, E> {
144143
self.edges.len()
145144
}
146145

147-
///////////////////////////////////////////////////////////////////////////
148-
// Node construction
146+
// # Node construction
149147

150148
pub fn next_node_index(&self) -> NodeIndex {
151149
NodeIndex(self.nodes.len())
@@ -172,8 +170,7 @@ impl<N: Debug, E: Debug> Graph<N, E> {
172170
&self.nodes[idx.0]
173171
}
174172

175-
///////////////////////////////////////////////////////////////////////////
176-
// Edge construction and queries
173+
// # Edge construction and queries
177174

178175
pub fn next_edge_index(&self) -> EdgeIndex {
179176
EdgeIndex(self.edges.len())
@@ -232,8 +229,7 @@ impl<N: Debug, E: Debug> Graph<N, E> {
232229
self.edges[edge.0].next_edge[dir.repr]
233230
}
234231

235-
///////////////////////////////////////////////////////////////////////////
236-
// Iterating over nodes, edges
232+
// # Iterating over nodes, edges
237233

238234
pub fn each_node<'a, F>(&'a self, mut f: F) -> bool
239235
where F: FnMut(NodeIndex, &'a Node<N>) -> bool
@@ -274,8 +270,7 @@ impl<N: Debug, E: Debug> Graph<N, E> {
274270
self.incoming_edges(target).sources()
275271
}
276272

277-
///////////////////////////////////////////////////////////////////////////
278-
// Fixed-point iteration
273+
// # Fixed-point iteration
279274
//
280275
// A common use for graphs in our compiler is to perform
281276
// fixed-point iteration. In this case, each edge represents a
@@ -306,8 +301,7 @@ impl<N: Debug, E: Debug> Graph<N, E> {
306301
}
307302
}
308303

309-
///////////////////////////////////////////////////////////////////////////
310-
// Iterators
304+
// # Iterators
311305

312306
pub struct AdjacentEdges<'g, N, E>
313307
where N: 'g,

src/librustc_data_structures/unify/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,7 @@ impl<K: UnifyKey> sv::SnapshotVecDelegate for Delegate<K> {
251251
fn reverse(_: &mut Vec<VarValue<K>>, _: ()) {}
252252
}
253253

254-
///////////////////////////////////////////////////////////////////////////
255-
// Base union-find algorithm, where we are just making sets
254+
// # Base union-find algorithm, where we are just making sets
256255

257256
impl<'tcx, K: UnifyKey> UnificationTable<K>
258257
where K::Value: Combine
@@ -281,7 +280,8 @@ impl<'tcx, K: UnifyKey> UnificationTable<K>
281280
}
282281
}
283282

284-
///////////////////////////////////////////////////////////////////////////
283+
// # Non-subtyping unification
284+
//
285285
// Code to handle keys which carry a value, like ints,
286286
// floats---anything that doesn't have a subtyping relationship we
287287
// need to worry about.

0 commit comments

Comments
 (0)