Skip to content

Commit 2ca89b9

Browse files
authored
Unrolled build for #143935
Rollup merge of #143935 - ada4a:walk-docstring, r=compiler-errors rustc_type_ir/walk: move docstring to `TypeWalker` itself having it on the impl block is a bit weird imo
2 parents a9fb610 + 1b8d65e commit 2ca89b9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

compiler/rustc_type_ir/src/walk.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,6 @@ use crate::{self as ty, Interner};
1212
// avoid heap allocations.
1313
type TypeWalkerStack<I> = SmallVec<[<I as Interner>::GenericArg; 8]>;
1414

15-
pub struct TypeWalker<I: Interner> {
16-
stack: TypeWalkerStack<I>,
17-
last_subtree: usize,
18-
pub visited: SsoHashSet<I::GenericArg>,
19-
}
20-
2115
/// An iterator for walking the type tree.
2216
///
2317
/// It's very easy to produce a deeply
@@ -26,6 +20,12 @@ pub struct TypeWalker<I: Interner> {
2620
/// in this situation walker only visits each type once.
2721
/// It maintains a set of visited types and
2822
/// skips any types that are already there.
23+
pub struct TypeWalker<I: Interner> {
24+
stack: TypeWalkerStack<I>,
25+
last_subtree: usize,
26+
pub visited: SsoHashSet<I::GenericArg>,
27+
}
28+
2929
impl<I: Interner> TypeWalker<I> {
3030
pub fn new(root: I::GenericArg) -> Self {
3131
Self { stack: smallvec![root], last_subtree: 1, visited: SsoHashSet::new() }

0 commit comments

Comments
 (0)