File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
compiler/rustc_type_ir/src Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -12,12 +12,6 @@ use crate::{self as ty, Interner};
12
12
// avoid heap allocations.
13
13
type TypeWalkerStack < I > = SmallVec < [ <I as Interner >:: GenericArg ; 8 ] > ;
14
14
15
- pub struct TypeWalker < I : Interner > {
16
- stack : TypeWalkerStack < I > ,
17
- last_subtree : usize ,
18
- pub visited : SsoHashSet < I :: GenericArg > ,
19
- }
20
-
21
15
/// An iterator for walking the type tree.
22
16
///
23
17
/// It's very easy to produce a deeply
@@ -26,6 +20,12 @@ pub struct TypeWalker<I: Interner> {
26
20
/// in this situation walker only visits each type once.
27
21
/// It maintains a set of visited types and
28
22
/// 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
+
29
29
impl < I : Interner > TypeWalker < I > {
30
30
pub fn new ( root : I :: GenericArg ) -> Self {
31
31
Self { stack : smallvec ! [ root] , last_subtree : 1 , visited : SsoHashSet :: new ( ) }
You can’t perform that action at this time.
0 commit comments