]> git.proxmox.com Git - rustc.git/blobdiff - src/doc/rust-by-example/src/conversion.md
New upstream version 1.44.1+dfsg1
[rustc.git] / src / doc / rust-by-example / src / conversion.md
index 78d9e2d31e5090361ddaeb5fdefa5226783328a8..52a96d06c4dc0449151626679247f5a11494d598 100644 (file)
@@ -1,10 +1,14 @@
 # Conversion
 
-Rust addresses conversion between types by the use of [traits]. The generic
+Primitive types can be converted to each other through [casting].
+
+Rust addresses conversion between custom types (i.e., `struct` and `enum`)
+by the use of [traits]. The generic
 conversions will use the [`From`] and [`Into`] traits. However there are more
 specific ones for the more common cases, in particular when converting to and
 from `String`s.
 
+[casting]: types/cast.md
 [traits]: trait.md
 [`From`]: https://doc.rust-lang.org/std/convert/trait.From.html
 [`Into`]: https://doc.rust-lang.org/std/convert/trait.Into.html