@@ -853,6 +853,20 @@ extern crate std; // equivalent to: extern crate std as std;
853853extern crate std as ruststd; // linking to 'std' under another name
854854```
855855
856+ When naming Rust crates, hyphens are disallowed. However, Cargo packages may
857+ make use of them. In such case, when ` Cargo.toml ` doesn't specify a crate name,
858+ Cargo will transparently replace ` - ` with ` _ ` (Refer to [ RFC 940] for more
859+ details).
860+
861+ Here is an example:
862+
863+ ``` {.ignore}
864+ // Importing the Cargo package hello-world
865+ extern crate hello_world; // hyphen replaced with an underscore
866+ ```
867+
868+ [ RFC 940 ] : https://github.com/rust-lang/rfcs/blob/master/text/0940-hyphens-considered-harmful.md
869+
856870#### Use declarations
857871
858872A _ use declaration_ creates one or more local name bindings synonymous with
@@ -3744,9 +3758,9 @@ Since `'static` "lives longer" than `'a`, `&'static str` is a subtype of
37443758
37453759## Type coercions
37463760
3747- Coercions are defined in [ RFC401 ] . A coercion is implicit and has no syntax.
3761+ Coercions are defined in [ RFC 401 ] . A coercion is implicit and has no syntax.
37483762
3749- [ RFC401 ] : https://github.com/rust-lang/rfcs/blob/master/text/0401-coercions.md
3763+ [ RFC 401 ] : https://github.com/rust-lang/rfcs/blob/master/text/0401-coercions.md
37503764
37513765### Coercion sites
37523766
@@ -3886,7 +3900,7 @@ Coercion is allowed between the following types:
38863900
38873901 In the future, coerce_inner will be recursively extended to tuples and
38883902 structs. In addition, coercions from sub-traits to super-traits will be
3889- added. See [ RFC401 ] for more details.
3903+ added. See [ RFC 401 ] for more details.
38903904
38913905# Special traits
38923906
0 commit comments