Skip to content

Commit 918d097

Browse files
committed
Tiny typo changes (per discussion in pull request #22027)
1 parent 526e748 commit 918d097

File tree

6 files changed

+7
-8
lines changed

6 files changed

+7
-8
lines changed

src/doc/trpl/documentation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ comments":
1515
// the "link" crate attribute is currently required for rustdoc, but normally
1616
// isn't needed.
1717
#![crate_id = "universe"]
18-
#![crate_type = "lib"]
18+
#![crate_type= lib"]
1919
2020
//! Tools for dealing with universes (this is a doc comment, and is shown on
2121
//! the crate index page. The ! makes it apply to the parent of the comment,

src/doc/trpl/functions.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ This is a deliberate design decision. While full-program inference is possible,
7575
languages which have it, like Haskell, often suggest that documenting your
7676
types explicitly is a best-practice. We agree that forcing functions to declare
7777
types while allowing for inference inside of function bodies is a wonderful
78-
sweet spot between full inference and no inference. (For closures, i.e. unnamed
79-
functions, types do not have to be declared.)
78+
sweet spot between full inference and no inference.
8079

8180
What about returning a value? Here's a function that adds one to an integer:
8281

src/doc/trpl/match.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ match x {
2323
`match` takes an expression and then branches based on its value. Each *arm* of
2424
the branch is of the form `val => expression`. When the value matches, that arm's
2525
expression will be evaluated. It's called `match` because of the term 'pattern
26-
matching,' which `match` is an implementation of.
26+
matching', which `match` is an implementation of.
2727

2828
So what's the big advantage here? Well, there are a few. First of all, `match`
2929
enforces *exhaustiveness checking*. Do you see that last arm, the one with the

src/doc/trpl/method-syntax.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ multiplications later, and we have our area.
6161
## Chaining method calls
6262

6363
So, now we know how to call a method, such as `foo.bar()`. But what about our
64-
original example, `foo.bar().baz()`? This is called 'method chaining,' and we
64+
original example, `foo.bar().baz()`? This is called 'method chaining', and we
6565
can do it by returning `self`.
6666

6767
```

src/doc/trpl/more-strings.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Rust has two main types of strings: `&str` and `String`.
1414

1515
# &str
1616

17-
The first kind is a `&str`. This is pronounced a 'string slice.'
17+
The first kind is a `&str`. This is pronounced a 'string slice'.
1818
String literals are of the type `&str`:
1919

2020
```

src/doc/trpl/unsafe.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -648,8 +648,8 @@ The `rustc` compiler has certain pluggable operations, that is,
648648
functionality that isn't hard-coded into the language, but is
649649
implemented in libraries, with a special marker to tell the compiler
650650
it exists. The marker is the attribute `#[lang="..."]` and there are
651-
various different values of `...`, i.e. various different "lang
652-
items."
651+
various different values of `...`, i.e. various different 'lang
652+
items'.
653653

654654
For example, `Box` pointers require two lang items, one for allocation
655655
and one for deallocation. A freestanding program that uses the `Box`

0 commit comments

Comments
 (0)