1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-06-27 19:18:59 +02:00

Document the historical reference in the newtypes example (#826)

Document the historical reference in the newtypes example.
This commit is contained in:
Victor Costan
2023-06-18 05:37:57 -07:00
committed by GitHub
parent cb32c4d108
commit b2ebd8848c

View File

@ -40,4 +40,5 @@ fn main() {
* Demonstrate how to add a `f64` value to a `Newtons` type by accessing the single field in the newtype.
* Rust generally doesn’t like inexplicit things, like automatic unwrapping or for instance using booleans as integers.
* Operator overloading is discussed on Day 3 (generics).
* The example is a subtle reference to the [Mars Climate Orbiter](https://en.wikipedia.org/wiki/Mars_Climate_Orbiter) failure.
</details>