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 <balicki.aleksander@gmail.com>
1010
Alex Crichton <alex@alexcrichton.com>
1111
Alex Rønne Petersen <alex@lycus.org>
1212
Alexander Stavonin <a.stavonin@gmail.com>
13+
Alexei Sholik <alcosholik@gmail.com>
1314
Andreas Gal <gal@mozilla.com>
1415
Andrew Dunham <andrew@du.nham.ca>
1516
Andrew Paseltiner <apaseltiner@gmail.com>
17+
Anthony Juckel <ajuckel@gmail.com>
1618
Arkaitz Jimenez <arkaitzj@gmail.com>
1719
Armin Ronacher <armin.ronacher@active-4.com>
1820
Ashok Gautham <ScriptDevil@gmail.com>
@@ -29,23 +31,32 @@ Benjamin Kircher <benjamin.kircher@gmail.com>
2931
Benjamin Peterson <benjamin@python.org>
3032
Bilal Husain <bilal@bilalhusain.com>
3133
Bill Fallon <bill.fallon@robos.li>
34+
Bill Myers <bill_myers@outlook.com>
35+
Bill Wendling <wendling@apple.com>
36+
Björn Steinbrink <bsteinbr@gmail.com>
3237
Brendan Eich <brendan@mozilla.org>
3338
Brendan Zabarauskas <bjzaba@yahoo.com.au>
3439
Brett Cannon <brett@python.org>
3540
Brian Anderson <banderson@mozilla.com>
3641
Brian J. Burg <burg@cs.washington.edu>
3742
Brian Leibig <brian.leibig@gmail.com>
43+
Bryan Dunsmore <dunsmoreb@gmail.com>
44+
Caitlin Potter <snowball@defpixel.com>
3845
Chris Double <chris.double@double.co.nz>
3946
Chris Peterson <cpeterson@mozilla.com>
4047
Chris Pressey <cpressey@gmail.com>
4148
Cody Schroeder <codys@cs.washington.edu>
49+
Corey Richardson <corey@octayn.net>
4250
Damian Gryski <damian@gryski.com>
4351
Damien Grassart <damien@grassart.com>
4452
Damien Schoof <damien.schoof@gmail.com>
4553
Daniel Brooks <db48x@db48x.net>
54+
Daniel Farina <daniel@fdr.io>
55+
Dan Luu <danluu@gmail.com>
4656
Daniel Luz <dev@mernen.com>
4757
Daniel Micay <danielmicay@gmail.com>
4858
Daniel Patterson <dbp@riseup.net>
59+
Daniel Ralston <Wubbulous@gmail.com>
4960
Daniel Ursache Dogariu <contact@danniel.net>
5061
Dave Herman <dherman@mozilla.com>
5162
David Forsythe <dforsythe@gmail.com>
@@ -62,17 +73,21 @@ Eric Holmes <eric@ejholmes.net>
6273
Erick Tryzelaar <erick.tryzelaar@gmail.com>
6374
Erik Rose <erik@mozilla.com>
6475
Evan McClanahan <evan@evanmcc.com>
76+
Fedor Indutny <fedor.indutny@gmail.com>
6577
Felix S. Klock II <pnkfelix@pnkfx.org>
6678
Francisco Souza <f@souza.cc>
6779
Franklin Chen <franklinchen@franklinchen.com>
80+
Gábor Horváth <xazax.hun@gmail.com>
6881
Gabriel <g2p.code@gmail.com>
6982
Gareth Daniel Smith <garethdanielsmith@gmail.com>
83+
gifnksm <makoto.nksm@gmail.com>
7084
Glenn Willen <gwillen@nerdnet.org>
7185
Gonçalo Cabrita <_@gmcabrita.com>
7286
Graham Fawcett <fawcett@uwindsor.ca>
7387
Grahame Bowland <grahame@angrygoats.net>
7488
Haitao Li <lihaitao@gmail.com>
7589
hansjorg <hansjorg@gmail.com>
90+
Herman J. Radtke III <hermanradtke@gmail.com>
7691
Huon Wilson <dbau.pp+github@gmail.com>
7792
Ian D. Bollinger <ian.bollinger@gmail.com>
7893
Ilyong Cho <ilyoan@gmail.com>
@@ -83,6 +98,7 @@ Jacob Harris Cryer Kragh <jhckragh@gmail.com>
8398
Jacob Parker <j3parker@csclub.uwaterloo.ca>
8499
Jakub Wieczorek <jakubw@jakubw.net>
85100
James Miller <bladeon@gmail.com>
101+
James Tranovich <james@openhorizonlabs.com>
86102
Jason Orendorff <jorendorff@mozilla.com>
87103
Jed Davis <jld@panix.com>
88104
Jeff Balogh <jbalogh@mozilla.com>
@@ -92,6 +108,7 @@ Jeffrey Yasskin <jyasskin@gmail.com>
92108
Jeong YunWon <jeong@youknowone.org>
93109
Jens Nockert <jens@nockert.se>
94110
Jesse Jones <jesse9jones@gmail.com>
111+
Jesse Luehrs <doy@tozt.net>
95112
Jesse Ruderman <jruderman@gmail.com>
96113
Jihyun Yu <jihyun@nclab.kaist.ac.kr>
97114
Jim Blandy <jimb@red-bean.com>
@@ -104,14 +121,18 @@ Jonathan Sternberg <jonathansternberg@gmail.com>
104121
Josh Matthews <josh@joshmatthews.net>
105122
Joshua Clark <joshua.clark@txstate.edu>
106123
Joshua Wise <joshua@joshuawise.com>
124+
Junyoung Cho <june0.cho@samsung.com>
107125
Jyun-Yan You <jyyou@cs.nctu.edu.tw>
108126
Kang Seonghoon <kang.seonghoon@mearie.org>
109127
Kelly Wilson <wilsonk@cpsc.ucalgary.ca>
110128
Kevin Atkinson <kevina@cs.utah.edu>
129+
Kevin Ballard <kevin@sb.org>
111130
Kevin Cantu <me@kevincantu.org>
131+
klutzy <klutzytheklutzy@gmail.com>
112132
Kyeongwoon Lee <kyeongwoon.lee@samsung.com>
113133
Laurent Bonnans <bonnans.l@gmail.com>
114134
Lawrence Velázquez <larryv@alum.mit.edu>
135+
Leah Hanson <astrieanna@gmail.com>
115136
Lennart Kudling <github@kudling.de>
116137
Lindsey Kuper <lindsey@composition.al>
117138
Luca Bruno <lucab@debian.org>
@@ -122,6 +143,7 @@ Margaret Meyerhofer <mmeyerho@andrew.cmu.edu>
122143
Marijn Haverbeke <marijnh@gmail.com>
123144
Mark Lacey <641@rudkx.com>
124145
Mark Vian <mrv.caseus@gmail.com>
146+
Marti Raudsepp <marti@juffo.org>
125147
Martin DeMello <martindemello@gmail.com>
126148
Marvin Löbel <loebel.marvin@gmail.com>
127149
Matt Brubeck <mbrubeck@limpet.net>
@@ -143,43 +165,64 @@ Patrick Walton <pwalton@mozilla.com>
143165
Patrik Kårlin <patrik.karlin@gmail.com>
144166
Paul Stansifer <paul.stansifer@gmail.com>
145167
Paul Woolcock <pwoolcoc+github@gmail.com>
168+
Pavel Panchekha <me@pavpanchekha.com>
146169
Peter Hull <peterhull90@gmail.com>
147170
Peter Williams <peter@newton.cx>
148171
Philipp Brüschweiler <blei42@gmail.com>
149172
Rafael Ávila de Espíndola <respindola@mozilla.com>
173+
Ralph Bodenner <rkbodenner+github@gmail.com>
150174
Ralph Giles <giles@thaumas.net>
175+
Ramkumar Ramachandra <artagnon@gmail.com>
151176
Reuben Morais <reuben.morais@gmail.com>
152177
Rick Waldron <waldron.rick@gmail.com>
153178
Rob Arnold <robarnold@cs.cmu.edu>
179+
Rob Hoelz <rob@hoelz.ro>
154180
Roland Tanglao <roland@rolandtanglao.com>
181+
Ron Dahlgren <ronald.dahlgren@gmail.com>
155182
Roy Frostig <rfrostig@mozilla.com>
156183
Ryan Scheel <ryan.havvy@gmail.com>
184+
Samuel Chase <samebchase@gmail.com>
185+
Sander Mathijs van Veen <smvv@kompiler.org>
186+
Sangeun Kim <sammy.kim@samsung.com>
187+
Saurabh Anand <saurabhanandiit@gmail.com>
188+
Sean Moon <ssamoon@ucla.edu>
157189
Sean Stangl <sstangl@mozilla.com>
158190
Sebastian N. Fernandez <cachobot@gmail.com>
159191
Seth Pink <sethpink@gmail.com>
160192
Seo Sanghyeon <sanxiyn@gmail.com>
161193
sevrak <sevrak@rediffmail.com>
194+
SiegeLord <slabode@aim.com>
162195
Simon Barber-Dueck <sbarberdueck@gmail.com>
163196
Simon Sapin <simon@exyr.org>
164197
startling <tdixon51793@gmail.com>
165198
Stefan Plantikow <stefan.plantikow@googlemail.com>
166199
Steve Klabnik <steve@steveklabnik.com>
200+
Steven De Coeyer <steven@banteng.be>
201+
Steven Fackler <sfackler@gmail.com>
202+
Steven Stewart-Gallus <sstewartgallus00@langara.bc.ca>
167203
Taras Shpot <mrshpot@gmail.com>
168204
Ted Horst <ted.horst@earthlink.net>
169205
Thad Guidry <thadguidry@gmail.com>
206+
Thomas Daede <daede003@umn.edu>
170207
Tim Chevalier <chevalier@alum.wellesley.edu>
171208
Tim Taubert <tim@timtaubert.de>
172209
Tom Lee <github@tomlee.co>
210+
Tommy M. McGuire <mcguire@crsr.net>
173211
Tomoki Aonuma <uasi@99cm.org>
174212
Tony Young <tony@rfw.name>
175213
Trinick <slicksilver555@mac.com>
176214
Tycho Sci <tychosci@gmail.com>
177215
Tyler Bindon <martica@martica.org>
216+
Uwe Dauernheim <uwe@dauernheim.net>
217+
Vadim Chugunov <vadimcn@gmail.com>
178218
Viktor Dahl <pazaconyoman@gmail.com>
179219
Vincent Belliard <vincent@famillebelliard.fr>
220+
Vivek Galatage <vivekgalatage@gmail.com>
180221
Wade Mealing <wmealing@gmail.com>
181222
William Ting <william.h.ting@gmail.com>
182223
Yasuhiro Fujii <y-fujii@mimosa-pudica.net>
183224
Young-il Choi <duddlf.choi@samsung.com>
225+
Youngmin Yoo <youngmin.yoo@samsung.com>
184226
Youngsoo Son <ysson83@gmail.com>
185227
Zack Corr <zack@z0w0.me>
228+
zofrex <zofrex@gmail.com>

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)