Remove some unused pub functions (#11576)

## Summary

I left anything in `red-knot`, any `with_` methods, etc.
This commit is contained in:
Charlie Marsh 2024-05-28 09:56:51 -04:00 committed by GitHub
parent 3989cb8b56
commit 16acd4913f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 7 additions and 495 deletions

View file

@ -107,14 +107,6 @@ impl<'a> Scope<'a> {
})
}
/// Like [`Scope::binding_ids`], but returns all bindings that were added to the scope,
/// including those that were shadowed by later bindings.
pub fn all_binding_ids(&self) -> impl Iterator<Item = BindingId> + '_ {
self.bindings.values().copied().flat_map(|id| {
std::iter::successors(Some(id), |id| self.shadowed_bindings.get(id).copied())
})
}
/// Like [`Scope::bindings`], but returns all bindings added to the scope, including those that
/// were shadowed by later bindings.
pub fn all_bindings(&self) -> impl Iterator<Item = (&str, BindingId)> + '_ {
@ -144,11 +136,6 @@ impl<'a> Scope<'a> {
!self.star_imports.is_empty()
}
/// Returns an iterator over all star imports (e.g., `from sys import *`) in this scope.
pub fn star_imports(&self) -> impl Iterator<Item = &StarImport<'a>> {
self.star_imports.iter()
}
/// Set the globals pointer for this scope.
pub(crate) fn set_globals_id(&mut self, globals: GlobalsId) {
self.globals_id = Some(globals);