From 064ad83cc3555fc2ca747cffaf0445365acb866c Mon Sep 17 00:00:00 2001 From: Nixon Enraght-Moony Date: Fri, 28 Oct 2022 01:43:37 +0100 Subject: [PATCH] rustdoc-json-types: Improve ItemSummary::path docs --- src/rustdoc-json-types/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/rustdoc-json-types/lib.rs b/src/rustdoc-json-types/lib.rs index 7379b04ad1677..4bc91fc4030e2 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, /// Whether this item is a struct, trait, macro, etc. pub kind: ItemKind,