Skip to content

Commit a9cad52

Browse files
committed
Merge pull request #1574 from Wensleydale/tut-spelling
tutorial.md: spelling corrections for sections 1-5
2 parents f435805 + 1a29509 commit a9cad52

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

doc/tutorial.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ fn fac(n: int) -> int {
3838
Several differences from C stand out. Types do not come before, but
3939
after variable names (preceded by a colon). In local variables
4040
(introduced with `let`), they are optional, and will be inferred when
41-
left off. Constructs like `while` and `if` do not require parenthesis
41+
left off. Constructs like `while` and `if` do not require parentheses
4242
around the condition (though they allow them). Also, there's a
4343
tendency towards aggressive abbreviation in the keywords—`fn` for
4444
function, `ret` for return.
@@ -52,7 +52,7 @@ quite a different direction.
5252
Throughout the tutorial, words that indicate language keywords or
5353
identifiers defined in the example code are displayed in `code font`.
5454

55-
Code snippets are indented, and also shown in a monospace font. Not
55+
Code snippets are indented, and also shown in a monospaced font. Not
5656
all snippets constitute whole programs. For brevity, we'll often show
5757
fragments of programs that don't compile on their own. To try them
5858
out, you might have to wrap them in `fn main() { ... }`, and make sure
@@ -176,7 +176,7 @@ detail [later on](#modules-and-crates).
176176

177177
## Editing Rust code
178178

179-
There are Vim highlighting and indentation scrips in the Rust source
179+
There are Vim highlighting and indentation scripts in the Rust source
180180
distribution under `src/etc/vim/`, and an emacs mode under
181181
`src/etc/emacs/`.
182182

@@ -260,7 +260,7 @@ fn is_four(x: int) -> bool { x == 4 }
260260
~~~~
261261

262262
In short, everything that's not a declaration (`let` for variables,
263-
`fn` for functions, etcetera) is an expression.
263+
`fn` for functions, et cetera) is an expression.
264264

265265
If all those things are expressions, you might conclude that you have
266266
to add a terminating semicolon after *every* statement, even ones that
@@ -285,7 +285,7 @@ The double-colon (`::`) is used as a module separator, so
285285
`std::io::println` means 'the thing named `println` in the module
286286
named `io` in the module named `std`'.
287287

288-
Rust will normally emit warning about unused variables. These can be
288+
Rust will normally emit warnings about unused variables. These can be
289289
suppressed by using a variable name that starts with an underscore.
290290

291291
~~~~
@@ -364,7 +364,7 @@ The basic types are written like this:
364364
: A character is a 32-bit Unicode code point.
365365

366366
`str`
367-
: String type. A string contains a utf-8 encoded sequence of characters.
367+
: String type. A string contains a UTF-8 encoded sequence of characters.
368368

369369
These can be combined in composite types, which will be described in
370370
more detail later on (the `T`s here stand for any other type):
@@ -403,7 +403,7 @@ synonym.
403403
## Literals
404404

405405
Integers can be written in decimal (`144`), hexadecimal (`0x90`), and
406-
binary (`0b10010000`) base. Without suffix, an integer literal is
406+
binary (`0b10010000`) base. Without a suffix, an integer literal is
407407
considered to be of type `int`. Add a `u` (`144u`) to make it a `uint`
408408
instead. Literals of the fixed-size integer types can be created by
409409
the literal with the type name (`255u8`, `50i64`, etc).
@@ -413,7 +413,7 @@ happens. If you are adding one to a variable of type `uint`, you must
413413
type `v += 1u`—saying `+= 1` will give you a type error.
414414

415415
Floating point numbers are written `0.0`, `1e6`, or `2.1e-4`. Without
416-
suffix, the literal is assumed to be of type `float`. Suffixes `f32`
416+
a suffix, the literal is assumed to be of type `float`. Suffixes `f32`
417417
and `f64` can be used to create literals of a specific type. The
418418
suffix `f` can be used to write `float` literals without a dot or
419419
exponent: `3f`.
@@ -423,11 +423,11 @@ The nil literal is written just like the type: `()`. The keywords
423423

424424
Character literals are written between single quotes, as in `'x'`. You
425425
may put non-ascii characters between single quotes (your source files
426-
should be encoded as utf-8). Rust understands a number of
426+
should be encoded as UTF-8). Rust understands a number of
427427
character escapes, using the backslash character:
428428

429429
`\n`
430-
: A newline (unicode character 32).
430+
: A newline (Unicode character 32).
431431

432432
`\r`
433433
: A carriage return (13).
@@ -912,7 +912,7 @@ compiler can look at the argument type to find out what the parameter
912912
types are.
913913

914914
As a further simplification, if the final parameter to a function is a
915-
closure, the closure need not be placed within parenthesis. You could,
915+
closure, the closure need not be placed within parentheses. You could,
916916
for example, write...
917917

918918
~~~~

src/llvm

Submodule llvm updated 1211 files

0 commit comments

Comments
 (0)