diff --git a/src/exotic-sizes.md b/src/exotic-sizes.md index 0c59e2c..c4a6d24 100644 --- a/src/exotic-sizes.md +++ b/src/exotic-sizes.md @@ -157,9 +157,9 @@ because that wouldn't make sense. We recommend against modelling C's `void*` type with `*const Void`. A lot of people started doing that but quickly ran into trouble because Rust doesn't really have any safety guards against trying to instantiate -empty types with unsafe code, and if you do it, it's Undefined Behaviour. +empty types with unsafe code, and if you do it, it's Undefined Behavior. This was especially problematic because developers had a habit of converting -raw pointers to references and `&Void` is *also* Undefined Behaviour to +raw pointers to references and `&Void` is *also* Undefined Behavior to construct. `*const ()` (or equivalent) works reasonably well for `void*`, and can be made diff --git a/src/subtyping.md b/src/subtyping.md index c944c1e..91e870e 100644 --- a/src/subtyping.md +++ b/src/subtyping.md @@ -75,7 +75,7 @@ this stuff really works, and how we can mess it up. The core problem is that this rule, naively applied, will lead to *meowing Dogs*. That is, we can convince someone that a Dog is actually a Cat. This completely destroys the fabric -of our static type system, making it worse than useless (and leading to Undefined Behaviour). +of our static type system, making it worse than useless (and leading to Undefined Behavior). Here's a simple example of this happening when we apply subtyping in a completely naive "find and replace" way.