We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2cebf36 commit a506b7cCopy full SHA for a506b7c
src/doc/trpl/crates-and-modules.md
@@ -263,6 +263,10 @@ the `phrases` crate. We can then use `phrases`’ modules in this one. As we
263
mentioned earlier, you can use double colons to refer to sub-modules and the
264
functions inside of them.
265
266
+(Note: when importing a crate that has dashes in its name "like-this", which is
267
+not a valid Rust identifier, it will be converted by changing the dashes to
268
+underscores, so you would write `extern crate like_this;`.)
269
+
270
Also, Cargo assumes that `src/main.rs` is the crate root of a binary crate,
271
rather than a library crate. Our package now has two crates: `src/lib.rs` and
272
`src/main.rs`. This pattern is quite common for executable crates: most
0 commit comments