Skip to content

Commit

Permalink
docs: Unshare Doc type
Browse files Browse the repository at this point in the history
Summary: This type pretty much only existed for the doc registration stuff, but otherwise makes little sense to have as a shared thing.

Reviewed By: stepancheg

Differential Revision: D61778004

fbshipit-source-id: d71f095f0d3316d3506e3cb07f380548a9d42d1d
  • Loading branch information
JakobDegen authored and facebook-github-bot committed Oct 23, 2024
1 parent fa4ce65 commit eec29c1
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions starlark/src/docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ mod parse;
#[cfg(test)]
mod tests;

use std::collections::HashMap;
use std::iter;

use allocative::Allocative;
Expand All @@ -53,22 +52,6 @@ pub struct DocString {
pub details: Option<String>,
}

/// The file a symbol resides in, and if available its location within that file.
#[derive(Debug, Clone, PartialEq, Default)]
pub struct Location {
/// `path` is a string that can be passed into `load()` statements.
pub path: String,
}

/// The main identifier for a symbol.
#[derive(Debug, Clone, PartialEq, Default)]
pub struct Identifier {
/// The name of the symbol (e.g. the function name, a name or path for a module, etc).
pub name: String,
/// Where the symbol is located, or absent if it is a built-in symbol.
pub location: Option<Location>,
}

/// The documentation for a module/namespace.
///
/// See the docs on [`DocType`] for the distinction between that type and this one.
Expand Down Expand Up @@ -316,13 +299,3 @@ impl DocParam {
self.get_doc_string().map(|ds| ds.summary.as_str())
}
}

/// The main structure that represents the documentation for a given symbol / module.
#[derive(Debug, Clone, PartialEq)]
pub struct Doc {
pub id: Identifier,
pub item: DocItem,
/// Custom key-value pairs that are not interpreted directly by starlark, and can be
/// used as arbitrary data for documentation tooling.
pub custom_attrs: HashMap<String, String>,
}

0 comments on commit eec29c1

Please sign in to comment.