Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit bdffae1

Browse filesBrowse files
authored
Unrolled build for rust-lang#136396
Rollup merge of rust-lang#136396 - aDotInTheVoid:crate-isnt-package-whyyy, r=GuillaumeGomez rustdoc-json-types: Document that crate name isn't package name. This wasn't clear from the docs before: https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/.E2.9C.94.20Getting.20external.20crate.20names.20as.20defined. CC `@kpreid` r? `@GuillaumeGomez`
2 parents 8df89d1 + 510de59 commit bdffae1
Copy full SHA for bdffae1

File tree

Expand file treeCollapse file tree

1 file changed

+7
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-0
lines changed

‎src/rustdoc-json-types/lib.rs

Copy file name to clipboardExpand all lines: src/rustdoc-json-types/lib.rs
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ pub struct Crate {
6161
#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
6262
pub struct ExternalCrate {
6363
/// The name of the crate.
64+
///
65+
/// Note: This is the [*crate* name][crate-name], which may not be the same as the
66+
/// [*package* name][package-name]. For example, for <https://crates.io/crates/regex-syntax>,
67+
/// this field will be `regex_syntax` (which uses an `_`, not a `-`).
68+
///
69+
/// [crate-name]: https://doc.rust-lang.org/stable/cargo/reference/cargo-targets.html#the-name-field
70+
/// [package-name]: https://doc.rust-lang.org/stable/cargo/reference/manifest.html#the-name-field
6471
pub name: String,
6572
/// The root URL at which the crate's documentation lives.
6673
pub html_root_url: Option<String>,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.