File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed 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
846
846
```
847
847
848
848
When 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,
850
850
Cargo will transparently replace ` - ` with ` _ ` (Refer to [ RFC 940] for more
851
851
details).
852
852
853
853
Here is an example:
854
854
855
855
``` {.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
858
858
```
859
859
860
860
[ 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