Skip to content

Commit aa76d30

Browse files
Remove walk_shallow
1 parent 878dc79 commit aa76d30

File tree

1 file changed

+0
-17
lines changed
  • compiler/rustc_middle/src/ty

1 file changed

+0
-17
lines changed

compiler/rustc_middle/src/ty/walk.rs

-17
Original file line numberDiff line numberDiff line change
@@ -78,23 +78,6 @@ impl<'tcx> GenericArg<'tcx> {
7878
pub fn walk(self) -> TypeWalker<'tcx> {
7979
TypeWalker::new(self)
8080
}
81-
82-
/// Iterator that walks the immediate children of `self`. Hence
83-
/// `Foo<Bar<i32>, u32>` yields the sequence `[Bar<i32>, u32]`
84-
/// (but not `i32`, like `walk`).
85-
///
86-
/// Iterator only walks items once.
87-
/// It accepts visited set, updates it with all visited types
88-
/// and skips any types that are already there.
89-
pub fn walk_shallow(
90-
self,
91-
visited: &mut SsoHashSet<GenericArg<'tcx>>,
92-
) -> impl Iterator<Item = GenericArg<'tcx>> {
93-
let mut stack = SmallVec::new();
94-
push_inner(&mut stack, self);
95-
stack.retain(|a| visited.insert(*a));
96-
stack.into_iter()
97-
}
9881
}
9982

10083
impl<'tcx> Ty<'tcx> {

0 commit comments

Comments
 (0)