Skip to content

Commit

Permalink
Rollup merge of #24812 - jest:master, r=steveklabnik
Browse files Browse the repository at this point in the history
Conflicts:
	src/doc/trpl/variable-bindings.md
  • Loading branch information
Manishearth committed Apr 25, 2015
2 parents 007c81b + 2c2abe9 commit 9316b03
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/doc/trpl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/doc/trpl/closures.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/doc/trpl/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
`<head>...</head>` section.
Expand Down
2 changes: 1 addition & 1 deletion src/doc/trpl/mutability.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion src/doc/trpl/trait-objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -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?

Expand Down
4 changes: 2 additions & 2 deletions src/doc/trpl/traits.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/doc/trpl/variable-bindings.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 9316b03

Please sign in to comment.