Skip to content

Commit fddb35e

Browse files
committed
auto merge of #7984 : gifnksm/rust/tutorial-links, r=bstrie
2 parents 63c9b11 + e68697b commit fddb35e

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

doc/tutorial.md

+6-8
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ was taken.
309309

310310
In short, everything that's not a declaration (declarations are `let` for
311311
variables; `fn` for functions; and any top-level named items such as
312-
[traits](#traits), [enum types](#enums), and [constants](#constants)) is an
312+
[traits](#traits), [enum types](#enums), and static items) is an
313313
expression, including function bodies.
314314

315315
~~~~
@@ -992,7 +992,7 @@ task-local garbage collector. It will be destroyed at some point after there
992992
are no references left to the box, no later than the end of the task. Managed
993993
boxes lack an owner, so they start a new ownership tree and don't inherit
994994
mutability. They do own the contained object, and mutability is defined by the
995-
type of the shared box (`@` or `@mut`). An object containing a managed box is
995+
type of the managed box (`@` or `@mut`). An object containing a managed box is
996996
not `Owned`, and can't be sent between tasks.
997997

998998
~~~~
@@ -1089,10 +1089,8 @@ we might like to compute the distance between `on_the_stack` and
10891089
to define a function that takes two arguments of type point—that is,
10901090
it takes the points by value. But this will cause the points to be
10911091
copied when we call the function. For points, this is probably not so
1092-
bad, but often copies are expensive or, worse, if there are mutable
1093-
fields, they can change the semantics of your program. So we’d like to
1094-
define a function that takes the points by pointer. We can use
1095-
borrowed pointers to do this:
1092+
bad, but often copies are expensive. So we’d like to define a function
1093+
that takes the points by pointer. We can use borrowed pointers to do this:
10961094
10971095
~~~
10981096
# struct Point { x: float, y: float }
@@ -1375,7 +1373,7 @@ let exchange_crayons: ~str = ~"Black, BlizzardBlue, Blue";
13751373
~~~
13761374

13771375
Both vectors and strings support a number of useful
1378-
[methods](#functions-and-methods), defined in [`std::vec`]
1376+
[methods](#methods), defined in [`std::vec`]
13791377
and [`std::str`]. Here are some examples.
13801378

13811379
[`std::vec`]: std/vec.html
@@ -1930,7 +1928,7 @@ that implements a trait includes the name of the trait at the start of
19301928
the definition, as in the following impls of `Printable` for `int`
19311929
and `~str`.
19321930

1933-
[impls]: #functions-and-methods
1931+
[impls]: #methods
19341932

19351933
~~~~
19361934
# trait Printable { fn print(&self); }

0 commit comments

Comments
 (0)