about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-07-05 16:13:20 -0400
committerMichael Goulet <michael@errs.io>2024-07-06 10:47:46 -0400
commitc2a88ea6cad74bfdad451e055a59b0794d0909ff (patch)
tree0742f7239db7cbc7ea48c433d23d28a95cc21aa3
parentcc6c5de39d51ea41a0189c863130650870526f5d (diff)
downloadrust-c2a88ea6cad74bfdad451e055a59b0794d0909ff.tar.gz
rust-c2a88ea6cad74bfdad451e055a59b0794d0909ff.zip
Remove walk_shallow
-rw-r--r--compiler/rustc_middle/src/ty/walk.rs17
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> {