Skip to content

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

Merged
merged 2 commits into from
Jul 17, 2016
Merged

Conversation

andradei
Copy link

@andradei andradei commented May 2, 2016

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.

- It also keeps mentions to RFCs consistent with the format "RFC XXX"
@rust-highfive
Copy link
Contributor

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,
Copy link
Member

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

@Manishearth
Copy link
Member

lgtm, one nit


```{.ignore}
// Importing the Cargo package hello-world/
extern crate hello_world; // The crate name replaced the hyphen
Copy link
Contributor

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"?

@andradei
Copy link
Author

andradei commented May 3, 2016

Thanks for catching the discrepancies. I hope the changes are better phrased now.

@apasel422
Copy link
Contributor

Ping @Manishearth.

@Manishearth
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jul 16, 2016

📌 Commit ba6ce12 has been approved by Manishearth

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jul 16, 2016
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.
bors added a commit that referenced this pull request Jul 17, 2016
Rollup of 7 pull requests

- Successful merges: #33362, #34768, #34837, #34838, #34847, #34848, #34849
- Failed merges: #33951, #34850
@bors bors merged commit ba6ce12 into rust-lang:master Jul 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants