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

Sign up
Appearance settings

Commit 510de59

Browse files
rustdoc-json-types: Document that crate name isn't package name.
1 parent 9e48dfe commit 510de59

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines 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)

AltStyle によって変換されたページ (->オリジナル) /