diff options
| author | Michael Goulet <michael@errs.io> | 2024-07-05 16:13:20 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-07-06 10:47:46 -0400 |
| commit | c2a88ea6cad74bfdad451e055a59b0794d0909ff (patch) | |
| tree | 0742f7239db7cbc7ea48c433d23d28a95cc21aa3 | |
| parent | cc6c5de39d51ea41a0189c863130650870526f5d (diff) | |
| download | rust-c2a88ea6cad74bfdad451e055a59b0794d0909ff.tar.gz rust-c2a88ea6cad74bfdad451e055a59b0794d0909ff.zip | |
Remove walk_shallow
| -rw-r--r-- | compiler/rustc_middle/src/ty/walk.rs | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/compiler/rustc_middle/src/ty/walk.rs b/compiler/rustc_middle/src/ty/walk.rs index e0f204a687f..efcaf89081f 100644 --- a/compiler/rustc_middle/src/ty/walk.rs +++ b/compiler/rustc_middle/src/ty/walk.rs @@ -78,23 +78,6 @@ impl<'tcx> GenericArg<'tcx> { pub fn walk(self) -> TypeWalker<'tcx> { TypeWalker::new(self) } - - /// Iterator that walks the immediate children of `self`. Hence - /// `Foo<Bar<i32>, u32>` yields the sequence `[Bar<i32>, u32]` - /// (but not `i32`, like `walk`). - /// - /// Iterator only walks items once. - /// It accepts visited set, updates it with all visited types - /// and skips any types that are already there. - pub fn walk_shallow( - self, - visited: &mut SsoHashSet<GenericArg<'tcx>>, - ) -> impl Iterator<Item = GenericArg<'tcx>> { - let mut stack = SmallVec::new(); - push_inner(&mut stack, self); - stack.retain(|a| visited.insert(*a)); - stack.into_iter() - } } impl<'tcx> Ty<'tcx> { |
