File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -846,15 +846,15 @@ extern crate std as ruststd; // linking to 'std' under another name
846846```
847847
848848When naming Rust crates, hyphens are disallowed. However, Cargo packages may
849- make use of them. In such case, when ` cargo .toml` doesn't specify a crate name,
849+ make use of them. In such case, when ` Cargo .toml` doesn't specify a crate name,
850850Cargo will transparently replace ` - ` with ` _ ` (Refer to [ RFC 940] for more
851851details).
852852
853853Here is an example:
854854
855855``` {.ignore}
856- // Importing the Cargo package hello-world/
857- extern crate hello_world; // The crate name replaced the hyphen
856+ // Importing the Cargo package hello-world
857+ extern crate hello_world; // hyphen replaced with an underscore
858858```
859859
860860[ RFC 940 ] : https://github.com/rust-lang/rfcs/blob/master/text/0940-hyphens-considered-harmful.md
You can’t perform that action at this time.
0 commit comments