Remove some unused pub functions (#11576)
## Summary I left anything in `red-knot`, any `with_` methods, etc.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user