Skip to content

Commit 526e748

Browse files
committed
Fix several tiny typos
1 parent 994ccd3 commit 526e748

File tree

8 files changed

+14
-14
lines changed

8 files changed

+14
-14
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/macros.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ The syntax `$(...)*` on the left-hand side of the `=>` in a macro definition
163163
accepts zero or more occurrences of its contents. It works much
164164
like the `*` operator in regular expressions. It also supports a
165165
separator token (a comma-separated list could be written `$(...),*`), and `+`
166-
instead of `*` to mean "at least one".
166+
instead of `*` to mean "at least one."
167167

168168
~~~~
169169
# enum T { SpecialA(u32), SpecialB(u32), SpecialC(u32), SpecialD(u32) }
@@ -195,7 +195,7 @@ As the above example demonstrates, `$(...)*` is also valid on the right-hand
195195
side of a macro definition. The behavior of `*` in transcription,
196196
especially in cases where multiple `*`s are nested, and multiple different
197197
names are involved, can seem somewhat magical and unintuitive at first. The
198-
system that interprets them is called "Macro By Example". The two rules to
198+
system that interprets them is called "Macro By Example." The two rules to
199199
keep in mind are (1) the behavior of `$(...)*` is to walk through one "layer"
200200
of repetitions for all of the `$name`s it contains in lockstep, and (2) each
201201
`$name` must be under at least as many `$(...)*`s as it was matched against.
@@ -309,7 +309,7 @@ there is a solution.
309309

310310
A macro may accept multiple different input grammars. The first one to
311311
successfully match the actual argument to a macro invocation is the one that
312-
"wins".
312+
"wins."
313313

314314
In the case of the example above, we want to write a recursive macro to
315315
process the semicolon-terminated lines, one-by-one. So, we want the following

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/ownership.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ struct Foo<'a> {
293293
}
294294

295295
fn main() {
296-
let y = &5; // this is the same as `let _y = 5; let y = &_y;
296+
let y = &5; // this is the same as `let _y = 5; let y = &_y;`
297297
let f = Foo { x: y };
298298

299299
println!("{}", f.x);

src/doc/trpl/unsafe.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ crate to allow) and of course requires an `unsafe` block.
308308
## Assembly template
309309

310310
The `assembly template` is the only required parameter and must be a
311-
literal string (i.e `""`)
311+
literal string (i.e. `""`)
312312

313313
```
314314
#![feature(asm)]
@@ -412,15 +412,15 @@ memory, `memory` should also be specified.
412412
## Options
413413

414414
The last section, `options` is specific to Rust. The format is comma
415-
separated literal strings (i.e `:"foo", "bar", "baz"`). It's used to
415+
separated literal strings (i.e. `:"foo", "bar", "baz"`). It's used to
416416
specify some extra info about the inline assembly:
417417

418418
Current valid options are:
419419

420420
1. *volatile* - specifying this is analogous to
421421
`__asm__ __volatile__ (...)` in gcc/clang.
422422
2. *alignstack* - certain instructions expect the stack to be
423-
aligned a certain way (i.e SSE) and specifying this indicates to
423+
aligned a certain way (i.e. SSE) and specifying this indicates to
424424
the compiler to insert its usual stack alignment code
425425
3. *intel* - use intel syntax instead of the default AT&T.
426426

@@ -649,7 +649,7 @@ 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
651651
various different values of `...`, i.e. various different "lang
652-
items".
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`

src/libcore/iter.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2348,7 +2348,7 @@ impl<A, St, F> Iterator for Unfold<St, F> where F: FnMut(&mut St) -> Option<A> {
23482348
/// iteration
23492349
#[derive(Clone)]
23502350
#[unstable(feature = "core",
2351-
reason = "may be renamed or replaced by range notation adapaters")]
2351+
reason = "may be renamed or replaced by range notation adapters")]
23522352
pub struct Counter<A> {
23532353
/// The current state the counter is at (next value to be yielded)
23542354
state: A,
@@ -2359,7 +2359,7 @@ pub struct Counter<A> {
23592359
/// Creates a new counter with the specified start/step
23602360
#[inline]
23612361
#[unstable(feature = "core",
2362-
reason = "may be renamed or replaced by range notation adapaters")]
2362+
reason = "may be renamed or replaced by range notation adapters")]
23632363
pub fn count<A>(start: A, step: A) -> Counter<A> {
23642364
Counter{state: start, step: step}
23652365
}

0 commit comments

Comments
 (0)