Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
red-knot: move symbol lookups in
symbol.rs
(#16152)
## Summary This PR does the following: * Moves the following from `types.rs` in `symbol.rs`: * `symbol` * `global_symbol` * `imported_symbol` * `symbol_from_bindings` * `symbol_from_declarations` * `SymbolAndQualifiers` * `SymbolFromDeclarationsResult` * Moves the following from `stdlib.rs` in `symbol.rs` and removes `stdlib.rs`: * `known_module_symbol` * `builtins_symbol` * `typing_symbol` (only for tests) * `typing_extensions_symbol` * `builtins_module_scope` * `core_module_scope` * Add `symbol_from_bindings_impl` and `symbol_from_declarations_impl` to keep `RequiresExplicitReExport` an implementation detail * Make `declaration_type` a `pub(crate)` as it's required in `symbol_from_declarations` (`binding_type` is already `pub(crate)` The main motivation is to keep the implementation details private and only expose an ergonomic API which uses sane defaults for various scenario to avoid any mistakes from the caller. Refer to #16133 (comment), #16133 (comment) for details.
- Loading branch information