-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Add mention to RFC 940 in the Rust Reference. #33362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- It also keeps mentions to RFCs consistent with the format "RFC XXX"
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Manishearth (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
@@ -845,6 +845,20 @@ extern crate std; // equivalent to: extern crate std as std; | |||
extern crate std as ruststd; // linking to 'std' under another name | |||
``` | |||
|
|||
When naming Rust crates, hyphens are disallowed. However, Cargo packages may | |||
make use of them. In such case, when `cargo.toml` doesn't specify a crate name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cargo.toml is has a capital c
lgtm, one nit |
|
||
```{.ignore} | ||
// Importing the Cargo package hello-world/ | ||
extern crate hello_world; // The crate name replaced the hyphen |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- trailing
/
looks suspicious? - did you mean "The underscore replaced the hyphen"?
Thanks for catching the discrepancies. I hope the changes are better phrased now. |
Ping @Manishearth. |
@bors r+ rollup |
📌 Commit ba6ce12 has been approved by |
Add mention to RFC 940 in the Rust Reference. This PR adds a mention to hyphens in Cargo package names being replaced by underscores when used as a crate, as per [RFC 940](https://github.com/rust-lang/rfcs/blob/master/text/0940-hyphens-considered-harmful.md) It also formats the RFCs consistently as RFC XXX instead of RFCXXX.
This PR adds a mention to hyphens in Cargo package names being replaced by underscores when used as a crate, as per RFC 940
It also formats the RFCs consistently as RFC XXX instead of RFCXXX.