Skip to content

Commit 31d81b8

Browse files
authored
Rollup merge of rust-lang#103664 - aDotInTheVoid:rdj-path-docs, r=Urgau,GuillaumeGomez
rustdoc-json-types: Improve ItemSummary::path docs Somewhat inspired by the doc changes from rust-lang#103085 (cc `@Urgau)` r? `@GuillaumeGomez`
2 parents 37604ab + 064ad83 commit 31d81b8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/rustdoc-json-types/lib.rs

+5
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ pub struct ItemSummary {
5151
pub crate_id: u32,
5252
/// The list of path components for the fully qualified path of this item (e.g.
5353
/// `["std", "io", "lazy", "Lazy"]` for `std::io::lazy::Lazy`).
54+
///
55+
/// Note that items can appear in multiple paths, and the one chosen is implementation
56+
/// defined. Currenty, this is the full path to where the item was defined. Eg
57+
/// [`String`] is currently `["alloc", "string", "String"]` and [`HashMap`] is
58+
/// `["std", "collections", "hash", "map", "HashMap"]`, but this is subject to change.
5459
pub path: Vec<String>,
5560
/// Whether this item is a struct, trait, macro, etc.
5661
pub kind: ItemKind,

0 commit comments

Comments
 (0)