Skip to content

Commit 0228e89

Browse files
ndmitchellfacebook-github-bot
authored andcommitted
Hide the exported function
Summary: Wasn't actually used in practice, and we keep bending it to the will of the LSP. So hide the functions and move it into LSP world. Reviewed By: bobyangyf Differential Revision: D47195363 fbshipit-source-id: 883866438c28d4b4679246ad62b49ab7a5011f81
1 parent dcf6b37 commit 0228e89

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

starlark/src/analysis/exported.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use crate::syntax::AstModule;
2828
/// The type of an exported symbol.
2929
/// If unknown, will use `Any`.
3030
#[derive(Debug, PartialEq, Eq, Copy, Clone, Dupe, Hash)]
31-
pub enum SymbolKind {
31+
pub(crate) enum SymbolKind {
3232
/// Any kind of symbol.
3333
Any,
3434
/// The symbol represents something that can be called, for example
@@ -47,19 +47,19 @@ impl SymbolKind {
4747

4848
/// A symbol. Returned from [`AstModule::exported_symbols`].
4949
#[derive(Debug, PartialEq, Eq, Clone, Dupe, Hash)]
50-
pub struct Symbol<'a> {
50+
pub(crate) struct Symbol<'a> {
5151
/// The name of the symbol.
52-
pub name: &'a str,
52+
pub(crate) name: &'a str,
5353
/// The location of its definition.
54-
pub span: FileSpan,
54+
pub(crate) span: FileSpan,
5555
/// The type of symbol it represents.
56-
pub kind: SymbolKind,
56+
pub(crate) kind: SymbolKind,
5757
}
5858

5959
impl AstModule {
6060
/// Which symbols are exported by this module. These are the top-level assignments,
6161
/// including function definitions. Any symbols that start with `_` are not exported.
62-
pub fn exported_symbols<'a>(&'a self) -> Vec<Symbol<'a>> {
62+
pub(crate) fn exported_symbols<'a>(&'a self) -> Vec<Symbol<'a>> {
6363
// Map since we only want to store the first of each export
6464
// IndexMap since we want the order to match the order they were defined in
6565
let mut result: SmallMap<&'a str, _> = SmallMap::new();

0 commit comments

Comments
 (0)