Skip to content

Commit 9316b03

Browse files
committed
Rollup merge of #24812 - jest:master, r=steveklabnik
Conflicts: src/doc/trpl/variable-bindings.md
2 parents 007c81b + 2c2abe9 commit 9316b03

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

src/doc/trpl/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ good at: embedding in other languages, programs with specific space and time
88
requirements, and writing low-level code, like device drivers and operating
99
systems. It improves on current languages targeting this space by having a
1010
number of compile-time safety checks that produce no runtime overhead, while
11-
eliminating all data races. Rust also aims to achieve ‘zero-cost abstrations
11+
eliminating all data races. Rust also aims to achieve ‘zero-cost abstractions
1212
even though some of these abstractions feel like those of a high-level
1313
language. Even then, Rust still allows precise control like a low-level
1414
language would.

src/doc/trpl/closures.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ is `Fn(i32) -> i32`.
294294

295295
There’s one other key point here: because we’re bounding a generic with a
296296
trait, this will get monomorphized, and therefore, we’ll be doing static
297-
dispatch into the closure. That’s pretty neat. In many langauges, closures are
297+
dispatch into the closure. That’s pretty neat. In many languages, closures are
298298
inherently heap allocated, and will always involve dynamic dispatch. In Rust,
299299
we can stack allocate our closure environment, and statically dispatch the
300300
call. This happens quite often with iterators and their adapters, which often

src/doc/trpl/documentation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ This sets a few different options, with a logo, favicon, and a root URL.
556556

557557
## Generation options
558558

559-
`rustdoc` also contains a few other options on the command line, for further customiziation:
559+
`rustdoc` also contains a few other options on the command line, for further customization:
560560

561561
- `--html-in-header FILE`: includes the contents of FILE at the end of the
562562
`<head>...</head>` section.

src/doc/trpl/mutability.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ about it first.
129129

130130
## Field-level mutability
131131

132-
Mutabilty is a property of either a borrow (`&mut`) or a binding (`let mut`).
132+
Mutability is a property of either a borrow (`&mut`) or a binding (`let mut`).
133133
This means that, for example, you cannot have a [`struct`][struct] with
134134
some fields mutable and some immutable:
135135

src/doc/trpl/trait-objects.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ A function that takes a trait object is not specialized to each of the types
155155
that implements `Foo`: only one copy is generated, often (but not always)
156156
resulting in less code bloat. However, this comes at the cost of requiring
157157
slower virtual function calls, and effectively inhibiting any chance of
158-
inlining and related optimisations from occurring.
158+
inlining and related optimizations from occurring.
159159

160160
### Why pointers?
161161

src/doc/trpl/traits.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ won’t have its methods:
184184
```rust,ignore
185185
let mut f = std::fs::File::open("foo.txt").ok().expect("Couldn’t open foo.txt");
186186
let result = f.write("whatever".as_bytes());
187-
# result.unwrap(); // ignore the erorr
187+
# result.unwrap(); // ignore the error
188188
```
189189

190190
Here’s the error:
@@ -203,7 +203,7 @@ use std::io::Write;
203203
204204
let mut f = std::fs::File::open("foo.txt").ok().expect("Couldn’t open foo.txt");
205205
let result = f.write("whatever".as_bytes());
206-
# result.unwrap(); // ignore the erorr
206+
# result.unwrap(); // ignore the error
207207
```
208208

209209
This will compile without error.

src/doc/trpl/variable-bindings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
% Variable Bindings
22

3-
Virtually every non-Hello World’Rust program uses *variable bindings*. They
3+
Virtually every non-'Hello World’ Rust program uses *variable bindings*. They
44
look like this:
55

66
```rust

0 commit comments

Comments
 (0)