From eec29c1a9e7c2861dc2434e6933ab5f5595ad51d Mon Sep 17 00:00:00 2001 From: Jakob Degen Date: Tue, 22 Oct 2024 18:46:36 -0700 Subject: [PATCH] docs: Unshare `Doc` type 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 --- starlark/src/docs.rs | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/starlark/src/docs.rs b/starlark/src/docs.rs index 814c28300..99d212fd6 100644 --- a/starlark/src/docs.rs +++ b/starlark/src/docs.rs @@ -27,7 +27,6 @@ mod parse; #[cfg(test)] mod tests; -use std::collections::HashMap; use std::iter; use allocative::Allocative; @@ -53,22 +52,6 @@ pub struct DocString { pub details: Option, } -/// 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, -} - /// The documentation for a module/namespace. /// /// See the docs on [`DocType`] for the distinction between that type and this one. @@ -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, -}