diff --git a/src/doc/trpl/README.md b/src/doc/trpl/README.md index 01ef88dde2270..a892f67d571af 100644 --- a/src/doc/trpl/README.md +++ b/src/doc/trpl/README.md @@ -8,7 +8,7 @@ good at: embedding in other languages, programs with specific space and time requirements, and writing low-level code, like device drivers and operating systems. It improves on current languages targeting this space by having a number of compile-time safety checks that produce no runtime overhead, while -eliminating all data races. Rust also aims to achieve ‘zero-cost abstrations’ +eliminating all data races. Rust also aims to achieve ‘zero-cost abstractions’ even though some of these abstractions feel like those of a high-level language. Even then, Rust still allows precise control like a low-level language would. diff --git a/src/doc/trpl/closures.md b/src/doc/trpl/closures.md index 604dcb739df63..d7fa84761e527 100644 --- a/src/doc/trpl/closures.md +++ b/src/doc/trpl/closures.md @@ -294,7 +294,7 @@ is `Fn(i32) -> i32`. There’s one other key point here: because we’re bounding a generic with a trait, this will get monomorphized, and therefore, we’ll be doing static -dispatch into the closure. That’s pretty neat. In many langauges, closures are +dispatch into the closure. That’s pretty neat. In many languages, closures are inherently heap allocated, and will always involve dynamic dispatch. In Rust, we can stack allocate our closure environment, and statically dispatch the call. This happens quite often with iterators and their adapters, which often diff --git a/src/doc/trpl/documentation.md b/src/doc/trpl/documentation.md index 732521a0c6064..b28343e7fb94c 100644 --- a/src/doc/trpl/documentation.md +++ b/src/doc/trpl/documentation.md @@ -556,7 +556,7 @@ This sets a few different options, with a logo, favicon, and a root URL. ## Generation options -`rustdoc` also contains a few other options on the command line, for further customiziation: +`rustdoc` also contains a few other options on the command line, for further customization: - `--html-in-header FILE`: includes the contents of FILE at the end of the `...` section. diff --git a/src/doc/trpl/mutability.md b/src/doc/trpl/mutability.md index e7506dfe4fd7d..816bfb1797061 100644 --- a/src/doc/trpl/mutability.md +++ b/src/doc/trpl/mutability.md @@ -129,7 +129,7 @@ about it first. ## Field-level mutability -Mutabilty is a property of either a borrow (`&mut`) or a binding (`let mut`). +Mutability is a property of either a borrow (`&mut`) or a binding (`let mut`). This means that, for example, you cannot have a [`struct`][struct] with some fields mutable and some immutable: diff --git a/src/doc/trpl/trait-objects.md b/src/doc/trpl/trait-objects.md index 52f8cb335a93a..c01129057418c 100644 --- a/src/doc/trpl/trait-objects.md +++ b/src/doc/trpl/trait-objects.md @@ -155,7 +155,7 @@ A function that takes a trait object is not specialized to each of the types that implements `Foo`: only one copy is generated, often (but not always) resulting in less code bloat. However, this comes at the cost of requiring slower virtual function calls, and effectively inhibiting any chance of -inlining and related optimisations from occurring. +inlining and related optimizations from occurring. ### Why pointers? diff --git a/src/doc/trpl/traits.md b/src/doc/trpl/traits.md index 3e77d3c603bac..ea5d2ed711fed 100644 --- a/src/doc/trpl/traits.md +++ b/src/doc/trpl/traits.md @@ -184,7 +184,7 @@ won’t have its methods: ```rust,ignore let mut f = std::fs::File::open("foo.txt").ok().expect("Couldn’t open foo.txt"); let result = f.write("whatever".as_bytes()); -# result.unwrap(); // ignore the erorr +# result.unwrap(); // ignore the error ``` Here’s the error: @@ -203,7 +203,7 @@ use std::io::Write; let mut f = std::fs::File::open("foo.txt").ok().expect("Couldn’t open foo.txt"); let result = f.write("whatever".as_bytes()); -# result.unwrap(); // ignore the erorr +# result.unwrap(); // ignore the error ``` This will compile without error. diff --git a/src/doc/trpl/variable-bindings.md b/src/doc/trpl/variable-bindings.md index 0ee34d4b91d03..2166c046897f0 100644 --- a/src/doc/trpl/variable-bindings.md +++ b/src/doc/trpl/variable-bindings.md @@ -1,6 +1,6 @@ % Variable Bindings -Virtually every non-‘Hello World’Rust program uses *variable bindings*. They +Virtually every non-'Hello World’ Rust program uses *variable bindings*. They look like this: ```rust