Skip to content

Commit 708c774

Browse files
authored
Minor language fixes (#364)
1 parent 10d40c5 commit 708c774

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/destructors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Next variant.
120120

121121
In general this works really nicely because you don't need to worry about
122122
adding/removing drops when you refactor your data layout. Still there's
123-
certainly many valid usecases for needing to do trickier things with
123+
certainly many valid use cases for needing to do trickier things with
124124
destructors.
125125

126126
The classic safe solution to overriding recursive drop and allowing moving out

src/exotic-sizes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,9 @@ because that wouldn't make sense.
157157
We recommend against modelling C's `void*` type with `*const Void`.
158158
A lot of people started doing that but quickly ran into trouble because
159159
Rust doesn't really have any safety guards against trying to instantiate
160-
empty types with unsafe code, and if you do it, it's Undefined Behaviour.
160+
empty types with unsafe code, and if you do it, it's Undefined Behavior.
161161
This was especially problematic because developers had a habit of converting
162-
raw pointers to references and `&Void` is *also* Undefined Behaviour to
162+
raw pointers to references and `&Void` is *also* Undefined Behavior to
163163
construct.
164164

165165
`*const ()` (or equivalent) works reasonably well for `void*`, and can be made

src/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Where The Reference exists to detail the syntax and semantics of every part of t
3232

3333
The Reference will tell you the syntax and semantics of references, destructors, and unwinding, but it won't tell you how combining them can lead to exception-safety issues, or how to deal with those issues.
3434

35-
It should be noted that we haven't synced The Rustnomicon and The Reference well, so they may have a duplicate content.
35+
It should be noted that we haven't synced The Rustnomicon and The Reference well, so they may have duplicate content.
3636
In general, if the two documents disagree, The Reference should be assumed to be correct (it isn't yet considered normative, it's just better maintained).
3737

3838
Topics that are within the scope of this book include: the meaning of (un)safety, unsafe primitives provided by the language and standard library, techniques for creating safe abstractions with those unsafe primitives, subtyping and variance, exception-safety (panic/unwind-safety), working with uninitialized memory, type punning, concurrency, interoperating with other languages (FFI), optimization tricks, how constructs lower to compiler/OS/hardware primitives, how to **not** make the memory model people angry, how you're **going** to make the memory model people angry, and more.

src/subtyping.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ this stuff really works, and how we can mess it up.
7575

7676
The core problem is that this rule, naively applied, will lead to *meowing Dogs*. That is,
7777
we can convince someone that a Dog is actually a Cat. This completely destroys the fabric
78-
of our static type system, making it worse than useless (and leading to Undefined Behaviour).
78+
of our static type system, making it worse than useless (and leading to Undefined Behavior).
7979

8080
Here's a simple example of this happening when we apply subtyping in a completely naive
8181
"find and replace" way.

0 commit comments

Comments
 (0)