diff --git a/AUTHORS.txt b/AUTHORS.txt index 2f80341e21a..e742886961f 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -10,9 +10,11 @@ Aleksander Balicki Alex Crichton Alex Rønne Petersen Alexander Stavonin +Alexei Sholik Andreas Gal Andrew Dunham Andrew Paseltiner +Anthony Juckel Arkaitz Jimenez Armin Ronacher Ashok Gautham @@ -29,23 +31,32 @@ Benjamin Kircher Benjamin Peterson Bilal Husain Bill Fallon +Bill Myers +Bill Wendling +Björn Steinbrink Brendan Eich Brendan Zabarauskas Brett Cannon Brian Anderson Brian J. Burg Brian Leibig +Bryan Dunsmore +Caitlin Potter Chris Double Chris Peterson Chris Pressey Cody Schroeder +Corey Richardson Damian Gryski Damien Grassart Damien Schoof Daniel Brooks +Daniel Farina +Dan Luu Daniel Luz Daniel Micay Daniel Patterson +Daniel Ralston Daniel Ursache Dogariu Dave Herman David Forsythe @@ -62,17 +73,21 @@ Eric Holmes Erick Tryzelaar Erik Rose Evan McClanahan +Fedor Indutny Felix S. Klock II Francisco Souza Franklin Chen +Gábor Horváth Gabriel Gareth Daniel Smith +gifnksm Glenn Willen Gonçalo Cabrita <_@gmcabrita.com> Graham Fawcett Grahame Bowland Haitao Li hansjorg +Herman J. Radtke III Huon Wilson Ian D. Bollinger Ilyong Cho @@ -83,6 +98,7 @@ Jacob Harris Cryer Kragh Jacob Parker Jakub Wieczorek James Miller +James Tranovich Jason Orendorff Jed Davis Jeff Balogh @@ -92,6 +108,7 @@ Jeffrey Yasskin Jeong YunWon Jens Nockert Jesse Jones +Jesse Luehrs Jesse Ruderman Jihyun Yu Jim Blandy @@ -104,14 +121,18 @@ Jonathan Sternberg Josh Matthews Joshua Clark Joshua Wise +Junyoung Cho Jyun-Yan You Kang Seonghoon Kelly Wilson Kevin Atkinson +Kevin Ballard Kevin Cantu +klutzy Kyeongwoon Lee Laurent Bonnans Lawrence Velázquez +Leah Hanson Lennart Kudling Lindsey Kuper Luca Bruno @@ -122,6 +143,7 @@ Margaret Meyerhofer Marijn Haverbeke Mark Lacey <641@rudkx.com> Mark Vian +Marti Raudsepp Martin DeMello Marvin Löbel Matt Brubeck @@ -143,43 +165,64 @@ Patrick Walton Patrik Kårlin Paul Stansifer Paul Woolcock +Pavel Panchekha Peter Hull Peter Williams Philipp Brüschweiler Rafael Ávila de Espíndola +Ralph Bodenner Ralph Giles +Ramkumar Ramachandra Reuben Morais Rick Waldron Rob Arnold +Rob Hoelz Roland Tanglao +Ron Dahlgren Roy Frostig Ryan Scheel +Samuel Chase +Sander Mathijs van Veen +Sangeun Kim +Saurabh Anand +Sean Moon Sean Stangl Sebastian N. Fernandez Seth Pink Seo Sanghyeon sevrak +SiegeLord Simon Barber-Dueck Simon Sapin startling Stefan Plantikow Steve Klabnik +Steven De Coeyer +Steven Fackler +Steven Stewart-Gallus Taras Shpot Ted Horst Thad Guidry +Thomas Daede Tim Chevalier Tim Taubert Tom Lee +Tommy M. McGuire Tomoki Aonuma Tony Young Trinick Tycho Sci Tyler Bindon +Uwe Dauernheim +Vadim Chugunov Viktor Dahl Vincent Belliard +Vivek Galatage Wade Mealing William Ting Yasuhiro Fujii Young-il Choi +Youngmin Yoo Youngsoo Son Zack Corr +zofrex diff --git a/RELEASES.txt b/RELEASES.txt index d099b1336df..9777245e40c 100644 --- a/RELEASES.txt +++ b/RELEASES.txt @@ -7,12 +7,14 @@ Version 0.7 (July 2013) * `use mod` is no longer valid. * `fail!` and `assert!` accept `~str`, `&'static str` or `fmt!`-style argument list. - * `Encodable`, `Decodable`, `TotalOrd`, `TotalEq`, `DeepClone` can all - be automatically derived with `#[deriving(...)]`. + * `Encodable`, `Decodable`, `Ord`, `TotalOrd`, `TotalEq`, `DeepClone`, + `Rand`, `Zero` and `ToStr` can all be automatically derived with + `#[deriving(...)]`. * The `Durable` trait is replaced with the `'static` bounds. * At long last, 'argument modes' no longer exist. * The `bytes!` macro returns a vector of bytes for string, u8, char, and unsuffixed integer literals. + * `#[static_assert]` makes compile-time assertions about static bools. * Semantic changes * The borrow checker has been rewritten with flow-sensitivity, fixing @@ -34,7 +36,7 @@ Version 0.7 (July 2013) * The `#[mutable]` attribute makes a type that would otherwise be `Const`, note. TODO this may change to non_freeze before 0.7 * Unbounded recursion will abort the process after reaching the limit - specified by the `RUST_MAX_STACK` environment variable. + specified by the `RUST_MAX_STACK` environment variable (default: 1GB). * The `vecs_implicitly_copyable` lint mode has been removed. Vectors are never implicitly copyable. @@ -46,30 +48,36 @@ Version 0.7 (July 2013) * std: Prelude additions: `print`, `println`, `FromStr`, `ApproxEq`, `Equiv`, `Iterator`, `IteratorUtil`, many numeric traits, many tuple traits. * std: `iterator` module for external iterator objects. + * std: Many old internal vector and string iterators, + incl. `any`, `all`. removed. * std: new numeric traits: `Fractional`, `Real`, `RealExt`, `Integer`, `Ratio`, `Algebraic`, `Trigonometric`, `Exponential`, `Primitive`. * std: Tuple traits and accessors defined for up to 12-tuples, e.g. `(0, 1, 2).n2()` or `(0, 1, 2).n2_ref()`. - * std: many types implement `Clone` - tuples, @, @mut. TODO + * std: many types implement `Clone`. * std: `path` type renamed to `Path`. - * std: Many standalone functions removed in favor of methods in - `vec`, `str`. In the future methods will also work as functions. + * std: Many standalone functions removed in favor of methods and iterators + in `vec`, `str`. In the future methods will also work as functions. * std: `reinterpret_cast` removed. Used `transmute`. * std: ascii string handling in `std::ascii`. * std: `Rand` is implemented for ~/@. * std: `run` module for spawning processes overhauled. * std: Various atomic types added to `unstable::atomic`. * std: `LinearMap` and `LinearSet` renamed to `HashMap` and `HashSet`. + * std: Borrowed pointer functions moved from `ptr` to `borrow`. * std: Added `os::mkdir_recursive`. * std: Added `os::glob` function performs filesystems globs. * std: `FuzzyEq` renamed to `ApproxEq`. * std: `Map` now defines `pop` and `swap` methods. + * std: `Cell` constructors converted to static methods. + * extra: `rc` module adds the reference counted pointers, `Rc` and `RcMut`. * extra: `flate` module moved from `std` to `extra`. - * extra: `FileInput` implements `std::io::Reader`. + * extra: `fileinput` module for iterating over a series of files. * extra: `Complex` number type and `complex` module. * extra: `Rational` number type and `rational` module. * extra: `BigInt`, `BigUint` implement numeric and comparison traits. * extra: `term` uses terminfo now, is more correct. + * extra: `arc` functions converted to methods. * Tooling * `unused_unsafe` lint mode for detecting unnecessary `unsafe` blocks. diff --git a/doc/README b/doc/README index c3bb28a9e85..bb6ab77a802 100644 --- a/doc/README +++ b/doc/README @@ -1,10 +1,25 @@ -The markdown docs are only generated by make when node is installed (use -`make doc`). If you don't have node installed you can generate them yourself. -Unfortunately there's no real standard for markdown and all the tools work -differently. pandoc is one that seems to work well. +Pandoc, a universal document converter, is required to generate docs as HTML +from Rust's source code. It's available for most platforms here: +http://johnmacfarlane.net/pandoc/installing.html -To generate an html version of a doc do something like: -pandoc --from=markdown --to=html --number-sections -o build/doc/rust.html doc/rust.md && git web--browse build/doc/rust.html +Node.js (http://nodejs.org/) is also required for generating HTML from +the Markdown docs (reference manual, tutorials, etc.) distributed with +this git repository. + +To generate all the docs, run `make docs` from the root of the repository. +This will convert the distributed Markdown docs to HTML and generate HTML doc +for the 'std' and 'extra' libraries. + +To generate HTML documentation from one source file/crate, do something like: + + rustdoc --output-dir html-doc/ --output-format html ../src/libstd/path.rs + +(This, of course, requires that you've built/installed the `rustdoc` tool.) + +To generate an HTML version of a doc from Markdown, without having Node.js +installed, do something like: + + pandoc --from=markdown --to=html --number-sections -o rust.html rust.md The syntax for pandoc flavored markdown can be found at: http://johnmacfarlane.net/pandoc/README.html#pandocs-markdown diff --git a/doc/rust.md b/doc/rust.md index 9edbc44d6c2..f533bb50f75 100644 --- a/doc/rust.md +++ b/doc/rust.md @@ -1561,6 +1561,7 @@ Supported traits for `deriving` are: * `Clone` and `DeepClone`, to perform (deep) copies. * `IterBytes`, to iterate over the bytes in a data type. * `Rand`, to create a random instance of a data type. +* `Zero`, to create an zero (or empty) instance of a data type. * `ToStr`, to convert to a string. For a type with this instance, `obj.to_str()` has the same output as `fmt!("%?", obj)`. diff --git a/doc/tutorial-borrowed-ptr.md b/doc/tutorial-borrowed-ptr.md index 90b8e1051eb..1da1d046878 100644 --- a/doc/tutorial-borrowed-ptr.md +++ b/doc/tutorial-borrowed-ptr.md @@ -234,7 +234,7 @@ would therefore be subject to garbage collection. A heap box that is unrooted is one such that no pointer values in the heap point to it. It would violate memory safety for the box that was originally assigned to `x` to be garbage-collected, since a non-heap -pointer---`y`---still points into it. +pointer *`y`* still points into it. > ***Note:*** Our current implementation implements the garbage collector > using reference counting and cycle detection. @@ -475,7 +475,7 @@ but otherwise it requires that the data reside in immutable memory. # Returning borrowed pointers -So far, all of the examples we've looked at use borrowed pointers in a +So far, all of the examples we have looked at, use borrowed pointers in a “downward” direction. That is, a method or code block creates a borrowed pointer, then uses it within the same scope. It is also 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 other parameters. Named lifetimes that appear in function signatures are conceptually -the same as the other lifetimes we've seen before, but they are a bit +the same as the other lifetimes we have seen before, but they are a bit abstract: they don’t refer to a specific expression within `get_x()`, but rather to some expression within the *caller of `get_x()`*. The lifetime `r` is actually a kind of *lifetime parameter*: it is defined diff --git a/doc/tutorial-tasks.md b/doc/tutorial-tasks.md index 97c85a5c436..d302916025c 100644 --- a/doc/tutorial-tasks.md +++ b/doc/tutorial-tasks.md @@ -481,7 +481,7 @@ an `Error` result. TODO: Need discussion of `future_result` in order to make failure modes useful. -But not all failure is created equal. In some cases you might need to +But not all failures are created equal. In some cases you might need to abort the entire program (perhaps you're writing an assert which, if it trips, indicates an unrecoverable logic error); in other cases you might want to contain the failure at a certain boundary (perhaps a diff --git a/doc/tutorial.md b/doc/tutorial.md index f69f569faee..ee01f2a5bdf 100644 --- a/doc/tutorial.md +++ b/doc/tutorial.md @@ -1084,8 +1084,8 @@ let managed_box : @Point = @Point { x: 5.0, y: 1.0 }; let owned_box : ~Point = ~Point { x: 7.0, y: 9.0 }; ~~~ -Suppose we wanted to write a procedure that computed the distance -between any two points, no matter where they were stored. For example, +Suppose we want to write a procedure that computes the distance +between any two points, no matter where they are stored. For example, we might like to compute the distance between `on_the_stack` and `managed_box`, or between `managed_box` and `owned_box`. One option is to define a function that takes two arguments of type point—that is, @@ -1230,7 +1230,7 @@ let area = rect.area(); ~~~ You can write an expression that dereferences any number of pointers -automatically. For example, if you felt inclined, you could write +automatically. For example, if you feel inclined, you could write something silly like ~~~ @@ -1808,7 +1808,7 @@ s.draw_borrowed(); ~~~ Implementations may also define standalone (sometimes called "static") -methods. The absence of a `self` paramater distinguishes such methods. +methods. The absence of a `self` parameter distinguishes such methods. These methods are the preferred way to define constructor functions. ~~~~ {.xfail-test} @@ -2319,7 +2319,7 @@ enum ABC { A, B, C } The full list of derivable traits is `Eq`, `TotalEq`, `Ord`, `TotalOrd`, `Encodable` `Decodable`, `Clone`, `DeepClone`, -`IterBytes`, `Rand` and `ToStr`. +`IterBytes`, `Rand`, `Zero`, and `ToStr`. # Modules and crates @@ -2522,7 +2522,7 @@ will not be compiled successfully. ## A minimal example -Now for something that you can actually compile yourself. We have +Now for something that you can actually compile yourself, we have these two files: ~~~~ diff --git a/src/librustc/rustc.rc b/src/librustc/rustc.rc index 52247d64cdc..afa517d99a5 100644 --- a/src/librustc/rustc.rc +++ b/src/librustc/rustc.rc @@ -140,10 +140,10 @@ pub fn version(argv0: &str) { pub fn usage(argv0: &str) { let message = fmt!("Usage: %s [OPTIONS] INPUT", argv0); - io::println(fmt!("%s \ - Additional help: \ - -W help Print 'lint' options and default settings \ - -Z help Print internal options for debugging rustc", + io::println(fmt!("%s\ +Additional help: + -W help Print 'lint' options and default settings + -Z help Print internal options for debugging rustc\n", groups::usage(message, optgroups()))); } diff --git a/src/librustdoc/config.rs b/src/librustdoc/config.rs index 84a194627fb..e6732a05f00 100644 --- a/src/librustdoc/config.rs +++ b/src/librustdoc/config.rs @@ -1,4 +1,4 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -59,15 +59,15 @@ fn opt_help() -> ~str { ~"h" } fn opts() -> ~[(getopts::Opt, ~str)] { ~[ (getopts::optopt(opt_output_dir()), - ~"--output-dir put documents here"), + ~"--output-dir Put documents here (default: .)"), (getopts::optopt(opt_output_format()), - ~"--output-format either 'markdown' or 'html'"), + ~"--output-format 'markdown' or 'html' (default)"), (getopts::optopt(opt_output_style()), - ~"--output-style either 'doc-per-crate' or 'doc-per-mod'"), + ~"--output-style 'doc-per-crate' or 'doc-per-mod' (default)"), (getopts::optopt(opt_pandoc_cmd()), - ~"--pandoc-cmd the command for running pandoc"), + ~"--pandoc-cmd Command for running pandoc"), (getopts::optflag(opt_help()), - ~"-h print help") + ~"-h, --help Print help") ] }