diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-08-09 14:03:16 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-08-09 14:21:32 +1000 |
| commit | 3fc5469a8d340bd6872e8067ea449af90b79e142 (patch) | |
| tree | 329128089156b689decca4cbbed95df6718d02b1 | |
| parent | fac77538022b32b4298833b541feb457ca4548b0 (diff) | |
| download | rust-3fc5469a8d340bd6872e8067ea449af90b79e142.tar.gz rust-3fc5469a8d340bd6872e8067ea449af90b79e142.zip | |
Remove `Binder::split`.
It's unused.
| -rw-r--r-- | compiler/rustc_type_ir/src/binder.rs | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/compiler/rustc_type_ir/src/binder.rs b/compiler/rustc_type_ir/src/binder.rs index c1f6fb36324..84ff5cebba1 100644 --- a/compiler/rustc_type_ir/src/binder.rs +++ b/compiler/rustc_type_ir/src/binder.rs @@ -247,21 +247,6 @@ impl<I: Interner, T> Binder<I, T> { // `self.value` is equivalent to `self.skip_binder()` if self.value.has_escaping_bound_vars() { None } else { Some(self.skip_binder()) } } - - /// Splits the contents into two things that share the same binder - /// level as the original, returning two distinct binders. - /// - /// `f` should consider bound regions at depth 1 to be free, and - /// anything it produces with bound regions at depth 1 will be - /// bound in the resulting return values. - pub fn split<U, V, F>(self, f: F) -> (Binder<I, U>, Binder<I, V>) - where - F: FnOnce(T) -> (U, V), - { - let Binder { value, bound_vars } = self; - let (u, v) = f(value); - (Binder { value: u, bound_vars }, Binder { value: v, bound_vars }) - } } impl<I: Interner, T> Binder<I, Option<T>> { |
