about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-10-29 08:57:37 +0200
committerGitHub <noreply@github.com>2022-10-29 08:57:37 +0200
commit2ea661119995d5b9f44963517e334ea38a4e4d08 (patch)
treea838d08ac4442c82f93cbe2aabe151787ab970e7
parentf0eaa485698029db82375fd6acba3dfb1818623d (diff)
parent064ad83cc3555fc2ca747cffaf0445365acb866c (diff)
downloadrust-2ea661119995d5b9f44963517e334ea38a4e4d08.tar.gz
rust-2ea661119995d5b9f44963517e334ea38a4e4d08.zip
Rollup merge of #103664 - aDotInTheVoid:rdj-path-docs, r=Urgau,GuillaumeGomez
rustdoc-json-types: Improve ItemSummary::path docs

Somewhat inspired by the doc changes from #103085 (cc ``@Urgau)``

r? ``@GuillaumeGomez``
-rw-r--r--src/rustdoc-json-types/lib.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rustdoc-json-types/lib.rs b/src/rustdoc-json-types/lib.rs
index 7379b04ad16..4bc91fc4030 100644
--- a/src/rustdoc-json-types/lib.rs
+++ b/src/rustdoc-json-types/lib.rs
@@ -51,6 +51,11 @@ pub struct ItemSummary {
     pub crate_id: u32,
     /// The list of path components for the fully qualified path of this item (e.g.
     /// `["std", "io", "lazy", "Lazy"]` for `std::io::lazy::Lazy`).
+    ///
+    /// Note that items can appear in multiple paths, and the one chosen is implementation
+    /// defined. Currenty, this is the full path to where the item was defined. Eg
+    /// [`String`] is currently `["alloc", "string", "String"]` and [`HashMap`] is
+    /// `["std", "collections", "hash", "map", "HashMap"]`, but this is subject to change.
     pub path: Vec<String>,
     /// Whether this item is a struct, trait, macro, etc.
     pub kind: ItemKind,