Skip to content

Commit ef07d7c

Browse files
committed
Merge pull request #7270 from thestinger/doc
accumulated doc pull requests from the queue
2 parents 69e0704 + dfc04e5 commit ef07d7c

File tree

9 files changed

+100
-33
lines changed

9 files changed

+100
-33
lines changed

AUTHORS.txt

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ Aleksander Balicki <[email protected]>
1010
Alex Crichton <[email protected]>
1111
Alex Rønne Petersen <[email protected]>
1212
Alexander Stavonin <[email protected]>
13+
Alexei Sholik <[email protected]>
1314
Andreas Gal <[email protected]>
1415
Andrew Dunham <[email protected]>
1516
Andrew Paseltiner <[email protected]>
17+
Anthony Juckel <[email protected]>
1618
Arkaitz Jimenez <[email protected]>
1719
Armin Ronacher <[email protected]>
1820
Ashok Gautham <[email protected]>
@@ -29,23 +31,32 @@ Benjamin Kircher <[email protected]>
2931
Benjamin Peterson <[email protected]>
3032
Bilal Husain <[email protected]>
3133
Bill Fallon <[email protected]>
34+
Bill Myers <[email protected]>
35+
Bill Wendling <[email protected]>
36+
Björn Steinbrink <[email protected]>
3237
Brendan Eich <[email protected]>
3338
Brendan Zabarauskas <[email protected]>
3439
Brett Cannon <[email protected]>
3540
Brian Anderson <[email protected]>
3641
Brian J. Burg <[email protected]>
3742
Brian Leibig <[email protected]>
43+
Bryan Dunsmore <[email protected]>
44+
Caitlin Potter <[email protected]>
3845
Chris Double <[email protected]>
3946
Chris Peterson <[email protected]>
4047
Chris Pressey <[email protected]>
4148
Cody Schroeder <[email protected]>
49+
Corey Richardson <[email protected]>
4250
Damian Gryski <[email protected]>
4351
Damien Grassart <[email protected]>
4452
Damien Schoof <[email protected]>
4553
Daniel Brooks <[email protected]>
54+
Daniel Farina <[email protected]>
55+
4656
Daniel Luz <[email protected]>
4757
Daniel Micay <[email protected]>
4858
Daniel Patterson <[email protected]>
59+
Daniel Ralston <[email protected]>
4960
Daniel Ursache Dogariu <[email protected]>
5061
Dave Herman <[email protected]>
5162
David Forsythe <[email protected]>
@@ -62,17 +73,21 @@ Eric Holmes <[email protected]>
6273
Erick Tryzelaar <[email protected]>
6374
Erik Rose <[email protected]>
6475
Evan McClanahan <[email protected]>
76+
Fedor Indutny <[email protected]>
6577
Felix S. Klock II <[email protected]>
6678
Francisco Souza <[email protected]>
6779
Franklin Chen <[email protected]>
80+
Gábor Horváth <[email protected]>
6881
6982
Gareth Daniel Smith <[email protected]>
83+
7084
Glenn Willen <[email protected]>
7185
Gonçalo Cabrita <[email protected]>
7286
Graham Fawcett <[email protected]>
7387
Grahame Bowland <[email protected]>
7488
Haitao Li <[email protected]>
7589
90+
Herman J. Radtke III <[email protected]>
7691
Huon Wilson <[email protected]>
7792
Ian D. Bollinger <[email protected]>
7893
Ilyong Cho <[email protected]>
@@ -83,6 +98,7 @@ Jacob Harris Cryer Kragh <[email protected]>
8398
Jacob Parker <[email protected]>
8499
Jakub Wieczorek <[email protected]>
85100
James Miller <[email protected]>
101+
James Tranovich <[email protected]>
86102
Jason Orendorff <[email protected]>
87103
Jed Davis <[email protected]>
88104
Jeff Balogh <[email protected]>
@@ -92,6 +108,7 @@ Jeffrey Yasskin <[email protected]>
92108
Jeong YunWon <[email protected]>
93109
Jens Nockert <[email protected]>
94110
Jesse Jones <[email protected]>
111+
Jesse Luehrs <[email protected]>
95112
Jesse Ruderman <[email protected]>
96113
Jihyun Yu <[email protected]>
97114
Jim Blandy <[email protected]>
@@ -104,14 +121,18 @@ Jonathan Sternberg <[email protected]>
104121
Josh Matthews <[email protected]>
105122
Joshua Clark <[email protected]>
106123
Joshua Wise <[email protected]>
124+
Junyoung Cho <[email protected]>
107125
Jyun-Yan You <[email protected]>
108126
Kang Seonghoon <[email protected]>
109127
Kelly Wilson <[email protected]>
110128
Kevin Atkinson <[email protected]>
129+
Kevin Ballard <[email protected]>
111130
Kevin Cantu <[email protected]>
131+
112132
Kyeongwoon Lee <[email protected]>
113133
Laurent Bonnans <[email protected]>
114134
Lawrence Velázquez <[email protected]>
135+
Leah Hanson <[email protected]>
115136
Lennart Kudling <[email protected]>
116137
Lindsey Kuper <[email protected]>
117138
Luca Bruno <[email protected]>
@@ -122,6 +143,7 @@ Margaret Meyerhofer <[email protected]>
122143
Marijn Haverbeke <[email protected]>
123144
Mark Lacey <[email protected]>
124145
Mark Vian <[email protected]>
146+
Marti Raudsepp <[email protected]>
125147
Martin DeMello <[email protected]>
126148
Marvin Löbel <[email protected]>
127149
Matt Brubeck <[email protected]>
@@ -143,43 +165,64 @@ Patrick Walton <[email protected]>
143165
Patrik Kårlin <[email protected]>
144166
Paul Stansifer <[email protected]>
145167
Paul Woolcock <[email protected]>
168+
Pavel Panchekha <[email protected]>
146169
Peter Hull <[email protected]>
147170
Peter Williams <[email protected]>
148171
Philipp Brüschweiler <[email protected]>
149172
Rafael Ávila de Espíndola <[email protected]>
173+
Ralph Bodenner <[email protected]>
150174
Ralph Giles <[email protected]>
175+
Ramkumar Ramachandra <[email protected]>
151176
Reuben Morais <[email protected]>
152177
Rick Waldron <[email protected]>
153178
Rob Arnold <[email protected]>
179+
Rob Hoelz <[email protected]>
154180
Roland Tanglao <[email protected]>
181+
Ron Dahlgren <[email protected]>
155182
Roy Frostig <[email protected]>
156183
Ryan Scheel <[email protected]>
184+
Samuel Chase <[email protected]>
185+
Sander Mathijs van Veen <[email protected]>
186+
Sangeun Kim <[email protected]>
187+
Saurabh Anand <[email protected]>
188+
Sean Moon <[email protected]>
157189
Sean Stangl <[email protected]>
158190
Sebastian N. Fernandez <[email protected]>
159191
Seth Pink <[email protected]>
160192
Seo Sanghyeon <[email protected]>
161193
194+
SiegeLord <[email protected]>
162195
Simon Barber-Dueck <[email protected]>
163196
Simon Sapin <[email protected]>
164197
startling <[email protected]>
165198
Stefan Plantikow <[email protected]>
166199
Steve Klabnik <[email protected]>
200+
Steven De Coeyer <[email protected]>
201+
Steven Fackler <[email protected]>
202+
Steven Stewart-Gallus <[email protected]>
167203
Taras Shpot <[email protected]>
168204
Ted Horst <[email protected]>
169205
Thad Guidry <[email protected]>
206+
Thomas Daede <[email protected]>
170207
Tim Chevalier <[email protected]>
171208
Tim Taubert <[email protected]>
172209
210+
Tommy M. McGuire <[email protected]>
173211
Tomoki Aonuma <[email protected]>
174212
Tony Young <[email protected]>
175213
176214
Tycho Sci <[email protected]>
177215
Tyler Bindon <[email protected]>
216+
Uwe Dauernheim <[email protected]>
217+
Vadim Chugunov <[email protected]>
178218
Viktor Dahl <[email protected]>
179219
Vincent Belliard <[email protected]>
220+
Vivek Galatage <[email protected]>
180221
Wade Mealing <[email protected]>
181222
William Ting <[email protected]>
182223
Yasuhiro Fujii <[email protected]>
183224
Young-il Choi <[email protected]>
225+
Youngmin Yoo <[email protected]>
184226
Youngsoo Son <[email protected]>
185227
Zack Corr <[email protected]>
228+

RELEASES.txt

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ Version 0.7 (July 2013)
77
* `use mod` is no longer valid.
88
* `fail!` and `assert!` accept `~str`, `&'static str` or `fmt!`-style
99
argument list.
10-
* `Encodable`, `Decodable`, `TotalOrd`, `TotalEq`, `DeepClone` can all
11-
be automatically derived with `#[deriving(...)]`.
10+
* `Encodable`, `Decodable`, `Ord`, `TotalOrd`, `TotalEq`, `DeepClone`,
11+
`Rand`, `Zero` and `ToStr` can all be automatically derived with
12+
`#[deriving(...)]`.
1213
* The `Durable` trait is replaced with the `'static` bounds.
1314
* At long last, 'argument modes' no longer exist.
1415
* The `bytes!` macro returns a vector of bytes for string, u8, char,
1516
and unsuffixed integer literals.
17+
* `#[static_assert]` makes compile-time assertions about static bools.
1618

1719
* Semantic changes
1820
* The borrow checker has been rewritten with flow-sensitivity, fixing
@@ -34,7 +36,7 @@ Version 0.7 (July 2013)
3436
* The `#[mutable]` attribute makes a type that would otherwise be
3537
`Const`, note. TODO this may change to non_freeze before 0.7
3638
* Unbounded recursion will abort the process after reaching the limit
37-
specified by the `RUST_MAX_STACK` environment variable.
39+
specified by the `RUST_MAX_STACK` environment variable (default: 1GB).
3840
* The `vecs_implicitly_copyable` lint mode has been removed. Vectors
3941
are never implicitly copyable.
4042

@@ -46,30 +48,36 @@ Version 0.7 (July 2013)
4648
* std: Prelude additions: `print`, `println`, `FromStr`, `ApproxEq`, `Equiv`,
4749
`Iterator`, `IteratorUtil`, many numeric traits, many tuple traits.
4850
* std: `iterator` module for external iterator objects.
51+
* std: Many old internal vector and string iterators,
52+
incl. `any`, `all`. removed.
4953
* std: new numeric traits: `Fractional`, `Real`, `RealExt`, `Integer`, `Ratio`,
5054
`Algebraic`, `Trigonometric`, `Exponential`, `Primitive`.
5155
* std: Tuple traits and accessors defined for up to 12-tuples, e.g.
5256
`(0, 1, 2).n2()` or `(0, 1, 2).n2_ref()`.
53-
* std: many types implement `Clone` - tuples, @, @mut. TODO
57+
* std: many types implement `Clone`.
5458
* std: `path` type renamed to `Path`.
55-
* std: Many standalone functions removed in favor of methods in
56-
`vec`, `str`. In the future methods will also work as functions.
59+
* std: Many standalone functions removed in favor of methods and iterators
60+
in `vec`, `str`. In the future methods will also work as functions.
5761
* std: `reinterpret_cast` removed. Used `transmute`.
5862
* std: ascii string handling in `std::ascii`.
5963
* std: `Rand` is implemented for ~/@.
6064
* std: `run` module for spawning processes overhauled.
6165
* std: Various atomic types added to `unstable::atomic`.
6266
* std: `LinearMap` and `LinearSet` renamed to `HashMap` and `HashSet`.
67+
* std: Borrowed pointer functions moved from `ptr` to `borrow`.
6368
* std: Added `os::mkdir_recursive`.
6469
* std: Added `os::glob` function performs filesystems globs.
6570
* std: `FuzzyEq` renamed to `ApproxEq`.
6671
* std: `Map` now defines `pop` and `swap` methods.
72+
* std: `Cell` constructors converted to static methods.
73+
* extra: `rc` module adds the reference counted pointers, `Rc` and `RcMut`.
6774
* extra: `flate` module moved from `std` to `extra`.
68-
* extra: `FileInput` implements `std::io::Reader`.
75+
* extra: `fileinput` module for iterating over a series of files.
6976
* extra: `Complex` number type and `complex` module.
7077
* extra: `Rational` number type and `rational` module.
7178
* extra: `BigInt`, `BigUint` implement numeric and comparison traits.
7279
* extra: `term` uses terminfo now, is more correct.
80+
* extra: `arc` functions converted to methods.
7381

7482
* Tooling
7583
* `unused_unsafe` lint mode for detecting unnecessary `unsafe` blocks.

doc/README

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,25 @@
1-
The markdown docs are only generated by make when node is installed (use
2-
`make doc`). If you don't have node installed you can generate them yourself.
3-
Unfortunately there's no real standard for markdown and all the tools work
4-
differently. pandoc is one that seems to work well.
1+
Pandoc, a universal document converter, is required to generate docs as HTML
2+
from Rust's source code. It's available for most platforms here:
3+
http://johnmacfarlane.net/pandoc/installing.html
54

6-
To generate an html version of a doc do something like:
7-
pandoc --from=markdown --to=html --number-sections -o build/doc/rust.html doc/rust.md && git web--browse build/doc/rust.html
5+
Node.js (http://nodejs.org/) is also required for generating HTML from
6+
the Markdown docs (reference manual, tutorials, etc.) distributed with
7+
this git repository.
8+
9+
To generate all the docs, run `make docs` from the root of the repository.
10+
This will convert the distributed Markdown docs to HTML and generate HTML doc
11+
for the 'std' and 'extra' libraries.
12+
13+
To generate HTML documentation from one source file/crate, do something like:
14+
15+
rustdoc --output-dir html-doc/ --output-format html ../src/libstd/path.rs
16+
17+
(This, of course, requires that you've built/installed the `rustdoc` tool.)
18+
19+
To generate an HTML version of a doc from Markdown, without having Node.js
20+
installed, do something like:
21+
22+
pandoc --from=markdown --to=html --number-sections -o rust.html rust.md
823

924
The syntax for pandoc flavored markdown can be found at:
1025
http://johnmacfarlane.net/pandoc/README.html#pandocs-markdown

doc/rust.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1561,6 +1561,7 @@ Supported traits for `deriving` are:
15611561
* `Clone` and `DeepClone`, to perform (deep) copies.
15621562
* `IterBytes`, to iterate over the bytes in a data type.
15631563
* `Rand`, to create a random instance of a data type.
1564+
* `Zero`, to create an zero (or empty) instance of a data type.
15641565
* `ToStr`, to convert to a string. For a type with this instance,
15651566
`obj.to_str()` has the same output as `fmt!("%?", obj)`.
15661567

doc/tutorial-borrowed-ptr.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ would therefore be subject to garbage collection. A heap box that is
234234
unrooted is one such that no pointer values in the heap point to
235235
it. It would violate memory safety for the box that was originally
236236
assigned to `x` to be garbage-collected, since a non-heap
237-
pointer---`y`---still points into it.
237+
pointer *`y`* still points into it.
238238

239239
> ***Note:*** Our current implementation implements the garbage collector
240240
> using reference counting and cycle detection.
@@ -475,7 +475,7 @@ but otherwise it requires that the data reside in immutable memory.
475475

476476
# Returning borrowed pointers
477477

478-
So far, all of the examples we've looked at use borrowed pointers in a
478+
So far, all of the examples we have looked at, use borrowed pointers in a
479479
“downward” direction. That is, a method or code block creates a
480480
borrowed pointer, then uses it within the same scope. It is also
481481
possible to return borrowed pointers as the result of a function, but
@@ -509,7 +509,7 @@ guaranteed to refer to a distinct lifetime from the lifetimes of all
509509
other parameters.
510510

511511
Named lifetimes that appear in function signatures are conceptually
512-
the same as the other lifetimes we've seen before, but they are a bit
512+
the same as the other lifetimes we have seen before, but they are a bit
513513
abstract: they don’t refer to a specific expression within `get_x()`,
514514
but rather to some expression within the *caller of `get_x()`*. The
515515
lifetime `r` is actually a kind of *lifetime parameter*: it is defined

doc/tutorial-tasks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ an `Error` result.
481481
TODO: Need discussion of `future_result` in order to make failure
482482
modes useful.
483483

484-
But not all failure is created equal. In some cases you might need to
484+
But not all failures are created equal. In some cases you might need to
485485
abort the entire program (perhaps you're writing an assert which, if
486486
it trips, indicates an unrecoverable logic error); in other cases you
487487
might want to contain the failure at a certain boundary (perhaps a

doc/tutorial.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,8 +1084,8 @@ let managed_box : @Point = @Point { x: 5.0, y: 1.0 };
10841084
let owned_box : ~Point = ~Point { x: 7.0, y: 9.0 };
10851085
~~~
10861086
1087-
Suppose we wanted to write a procedure that computed the distance
1088-
between any two points, no matter where they were stored. For example,
1087+
Suppose we want to write a procedure that computes the distance
1088+
between any two points, no matter where they are stored. For example,
10891089
we might like to compute the distance between `on_the_stack` and
10901090
`managed_box`, or between `managed_box` and `owned_box`. One option is
10911091
to define a function that takes two arguments of type point—that is,
@@ -1230,7 +1230,7 @@ let area = rect.area();
12301230
~~~
12311231
12321232
You can write an expression that dereferences any number of pointers
1233-
automatically. For example, if you felt inclined, you could write
1233+
automatically. For example, if you feel inclined, you could write
12341234
something silly like
12351235
12361236
~~~
@@ -1808,7 +1808,7 @@ s.draw_borrowed();
18081808
~~~
18091809

18101810
Implementations may also define standalone (sometimes called "static")
1811-
methods. The absence of a `self` paramater distinguishes such methods.
1811+
methods. The absence of a `self` parameter distinguishes such methods.
18121812
These methods are the preferred way to define constructor functions.
18131813

18141814
~~~~ {.xfail-test}
@@ -2319,7 +2319,7 @@ enum ABC { A, B, C }
23192319

23202320
The full list of derivable traits is `Eq`, `TotalEq`, `Ord`,
23212321
`TotalOrd`, `Encodable` `Decodable`, `Clone`, `DeepClone`,
2322-
`IterBytes`, `Rand` and `ToStr`.
2322+
`IterBytes`, `Rand`, `Zero`, and `ToStr`.
23232323

23242324
# Modules and crates
23252325

@@ -2522,7 +2522,7 @@ will not be compiled successfully.
25222522

25232523
## A minimal example
25242524

2525-
Now for something that you can actually compile yourself. We have
2525+
Now for something that you can actually compile yourself, we have
25262526
these two files:
25272527

25282528
~~~~

src/librustc/rustc.rc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,10 @@ pub fn version(argv0: &str) {
140140

141141
pub fn usage(argv0: &str) {
142142
let message = fmt!("Usage: %s [OPTIONS] INPUT", argv0);
143-
io::println(fmt!("%s \
144-
Additional help: \
145-
-W help Print 'lint' options and default settings \
146-
-Z help Print internal options for debugging rustc",
143+
io::println(fmt!("%s\
144+
Additional help:
145+
-W help Print 'lint' options and default settings
146+
-Z help Print internal options for debugging rustc\n",
147147
groups::usage(message, optgroups())));
148148
}
149149

0 commit comments

Comments
 (0)