Skip to content

Commit cbd62bb

Browse files
committed
nits
1 parent 3326b10 commit cbd62bb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

text/0000-mergeable-rustdoc-cross-crate-info.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,9 @@ $ tree . -a
256256

257257
Currently, cross-crate information is written during the invocation of the `write_shared` function in [write_shared.rs](https://github.com/rust-lang/rust/blob/04ab7b2be0db3e6787f5303285c6b2ee6279868d/src/librustdoc/html/render/write_shared.rs#L47). This proposal does not add any new CCI or change their contents (modulo sorting order, whitespace).
258258

259-
The existing cross-crate information files, like `search-index.js`, all are lists of elements, rendered in an specified way (e.g. as a JavaScript file with a JSON array or an HTML index page containing an unordered list). The current rustdoc (in `write_shared`) pushes the current crate's version of the CCI into the one that is already found in `doc`, and renders a new version. The rest of the proposal uses the term **part** to refer to the pre-merged, pre-rendered element of a the CCI.
259+
The existing cross-crate information files, like `search-index.js`, all are lists of elements, rendered in an specified way (e.g. as a JavaScript file with a JSON array or an HTML index page containing an unordered list). The current rustdoc (in `write_shared`) pushes the current crate's version of the CCI into the one that is already found in `doc`, and renders a new version. The rest of the proposal uses the term **part** to refer to the pre-merged, pre-rendered element of the CCI.
260260

261-
## New subdirectory: `<parts out dir>/<crate name>/crate-info.json`
261+
## New file: `<parts out dir>/<crate name>/crate-info.json`
262262

263263
The `<parts out dir>/<crate name>/crate-info.json` file contains the unmerged contents of a single crates' version of their corresponding CCI. Typically, `<parts out dir>` is selected as `./target/doc.parts`. This file is written if the flag `--write-info-json=<parts out dir>` is provided.
264264

@@ -337,6 +337,7 @@ The implementation of the RFC itself is designed to produce only minimal changes
337337
* Change the sorting order of trait implementations, type implementations, and other cross-crate info in the HTML output of rustdoc
338338
* Add a comment on the last line of generated HTML pages, to store metadata relevant to appending items to them
339339
* Refactor the JavaScript contents of cross-crate information files, in ways that do not change their overall behavior. If the JavaScript fragment declared an array called `ALL_CRATES` with certain contents, it will continue to do so.
340+
340341
Changes this minimal are intended to avoid breaking tools that use the output of rustdoc, like Cargo, docs.rs, and rustdoc's JavaScript frontend, in the near-term. Going forward, rustdoc will not make formal guarantees about the content of cross-crate info files.
341342

342343
# Drawbacks

0 commit comments

Comments
 (0)