Skip to content

Commit 0eb9d41

Browse files
committed
Fixed a few typos in the tutorials.
1 parent 56c9c81 commit 0eb9d41

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

doc/tutorial-macros.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ forbidden.
6565
To take as an argument a fragment of Rust code, write `$` followed by a name
6666
(for use on the right-hand side), followed by a `:`, followed by the sort of
6767
fragment to match (the most common ones are `ident`, `expr`, `ty`, `pat`, and
68-
`block`). Anything not preceeded by a `$` is taken literally. The standard
68+
`block`). Anything not preceded by a `$` is taken literally. The standard
6969
rules of tokenization apply,
7070

7171
So `($x:ident => (($e:expr)))`, though excessively fancy, would create a macro
@@ -88,7 +88,7 @@ position).
8888

8989
Going back to the motivating example, suppose that we wanted each invocation
9090
of `early_return` to potentially accept multiple "special" identifiers. The
91-
syntax `$(...)*` accepts zero or more occurences of its contents, much like
91+
syntax `$(...)*` accepts zero or more occurrences of its contents, much like
9292
the Kleene star operator in regular expressions. It also supports a separator
9393
token (a comma-separated list could be written `$(...),*`), and `+` instead of
9494
`*` to mean "at least one".

doc/tutorial-tasks.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ In particular, there are currently two independent modules that provide
4747
a message passing interface to Rust code: `core::comm` and `core::pipes`.
4848
`core::comm` is an older, less efficient system that is being phased out
4949
in favor of `pipes`. At some point the existing `core::comm` API will
50-
be romoved and the user-facing portions of `core::pipes` will be moved
50+
be removed and the user-facing portions of `core::pipes` will be moved
5151
to `core::comm`. In this tutorial we will discuss `pipes` and ignore
5252
the `comm` API.
5353

@@ -58,7 +58,7 @@ concurrency at the moment.
5858
* [`core::comm`] - The deprecated message passing API
5959
* [`core::pipes`] - The new message passing infrastructure and API
6060
* [`std::comm`] - Higher level messaging types based on `core::pipes`
61-
* [`std::sync`] - More exotic synchronization tools, including locks
61+
* [`std::sync`] - More exotic synchronization tools, including locks
6262
* [`std::arc`] - The ARC type, for safely sharing immutable data
6363
* [`std::par`] - Some basic tools for implementing parallel algorithms
6464

@@ -151,7 +151,7 @@ commonly used, which we will cover presently.
151151

152152
The simplest way to create a pipe is to use the `pipes::stream`
153153
function to create a `(Chan, Port)` pair. In Rust parlance a 'channel'
154-
is a sending endpoint of a pipe, and a 'port' is the recieving
154+
is a sending endpoint of a pipe, and a 'port' is the receiving
155155
endpoint. Consider the following example of performing two calculations
156156
concurrently.
157157

@@ -183,7 +183,7 @@ let (chan, port): (Chan<int>, Port<int>) = stream();
183183
~~~~
184184

185185
The channel will be used by the child task to send data to the parent task,
186-
which will wait to recieve the data on the port. The next statement
186+
which will wait to receive the data on the port. The next statement
187187
spawns the child task.
188188

189189
~~~~
@@ -307,7 +307,7 @@ unrecoverable within a single task - once a task fails there is no way
307307
to "catch" the exception.
308308

309309
All tasks are, by default, _linked_ to each other, meaning their fate
310-
is interwined, and if one fails so do all of them.
310+
is intertwined, and if one fails so do all of them.
311311

312312
~~~
313313
# use task::spawn;

0 commit comments

Comments
 (0)