@@ -309,7 +309,7 @@ was taken.
309
309
310
310
In short, everything that's not a declaration (declarations are ` let ` for
311
311
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
313
313
expression, including function bodies.
314
314
315
315
~~~~
@@ -992,7 +992,7 @@ task-local garbage collector. It will be destroyed at some point after there
992
992
are no references left to the box, no later than the end of the task. Managed
993
993
boxes lack an owner, so they start a new ownership tree and don't inherit
994
994
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
996
996
not ` Owned ` , and can't be sent between tasks.
997
997
998
998
~~~~
@@ -1089,10 +1089,8 @@ we might like to compute the distance between `on_the_stack` and
1089
1089
to define a function that takes two arguments of type point—that is,
1090
1090
it takes the points by value. But this will cause the points to be
1091
1091
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:
1096
1094
1097
1095
~~~
1098
1096
# struct Point { x: float, y: float }
@@ -1375,7 +1373,7 @@ let exchange_crayons: ~str = ~"Black, BlizzardBlue, Blue";
1375
1373
~~~
1376
1374
1377
1375
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 ` ]
1379
1377
and [ ` std::str ` ] . Here are some examples.
1380
1378
1381
1379
[ `std::vec` ] : std/vec.html
@@ -1930,7 +1928,7 @@ that implements a trait includes the name of the trait at the start of
1930
1928
the definition, as in the following impls of ` Printable ` for ` int `
1931
1929
and ` ~str ` .
1932
1930
1933
- [ impls ] : #functions-and- methods
1931
+ [ impls ] : #methods
1934
1932
1935
1933
~~~~
1936
1934
# trait Printable { fn print(&self); }
0 commit comments