summary refs log tree commit diff
path: root/doc
AgeCommit message (Collapse)AuthorLines
2013-09-24auto merge of #9450 : jzelinskie/rust/tutorial-tasks-result-signature, ↵bors-1/+1
r=alexcrichton
2013-09-23auto merge of #9439 : steveklabnik/rust/build_rustpkg_tutorial, r=brsonbors-8/+8
Three things in this commit: 1. Actually build the rustpkg tutorial. I didn't know I needed this when I first wrote it. 2. Link to it rather than the manual from the tutorial. 3. Update the headers: most of them were one level too deeply nested.
2013-09-23Fix signature of Result in tasks tutorial. Closes #8343Jimmy Zelinskie-1/+1
2013-09-23test: Fix rustdoc and tests.Patrick Walton-28/+0
2013-09-23Add rustpkg tutorial to the official tutorials.Steve Klabnik-8/+8
Three things in this commit: 1. Actually build the rustpkg tutorial. I didn't know I needed this when I first wrote it. 2. Link to it rather than the manual from the tutorial. 3. Update the headers: most of them were one level too deeply nested.
2013-09-23auto merge of #9423 : madjar/rust/patch-1, r=alexcrichtonbors-1/+1
Just something I noticed while reading the tutorial.
2013-09-23Extended the module tutorial section about files a bitMarvin Löbel-13/+50
2013-09-23Fixed a small typo in the tutorialGeorges Dubus-1/+1
Just something I noticed while reading the tutorial.
2013-09-21Update version numbers to 0.8Brian Anderson-25/+25
2013-09-20auto merge of #9278 : alexcrichton/rust/ndebug, r=brsonbors-2/+2
Many people will be very confused that their debug! statements aren't working when they first use rust only to learn that they should have been building with `--cfg debug` the entire time. This inverts the meaning of the flag to instead of enabling debug statements, now it disables debug statements. This way the default behavior is a bit more reasonable, and requires less end-user configuration. Furthermore, this turns on debug by default when building the rustc compiler.
2013-09-20Invert --cfg debug to --cfg ndebugAlex Crichton-2/+2
Many people will be very confused that their debug! statements aren't working when they first use rust only to learn that they should have been building with `--cfg debug` the entire time. This inverts the meaning of the flag to instead of enabling debug statements, now it disables debug statements. This way the default behavior is a bit more reasonable, and requires less end-user configuration. Furthermore, this turns on debug by default when building the rustc compiler.
2013-09-20auto merge of #9327 : larsbergstrom/rust/tutorial_installation_tweak, ↵bors-3/+2
r=catamorphism I've had multiple people whom I pointed at the Rust tutorial ask me where to download the snapshot compiler, so I made the text more explicit.
2013-09-19auto merge of #9315 : thestinger/rust/doc, r=alexcrichtonbors-28/+33
This also renames the section, as managed vectors cannot be resized (since it would invalidate the other references).
2013-09-19Modernize extra::future APISteven Fackler-2/+2
2013-09-19Clarify that snapshots are automatically retrieved.Lars Bergstrom-3/+2
2013-09-19doc: Fix the tutorial's link to rustpkg docsblake2-ppc-2/+2
2013-09-18doc: Update container tutorial with new names of methods and macrosblake2-ppc-22/+27
`deque` -> `ringbuf`, mention `extra::dlist`. fix reference to vector method `bsearch`. Also convert all output in example code to use `print!`/`println!`
2013-09-18clarify vector stub in the container tutorialDaniel Micay-4/+4
This also renames the section, as managed vectors cannot be resized (since it would invalidate the other references).
2013-09-17Added support for a `\0` escape sequence.Daniel Rosenwasser-1/+1
This commit adds support for `\0` escapes in character and string literals. Since `\0` is equivalent to `\x00`, this is a direct translation to the latter escape sequence. Future builds will be able to compile using `\0` directly. Also updated the grammar specification and added a test for NUL characters.
2013-09-17document what unsafety meansDaniel Micay-11/+63
Closes #9144
2013-09-17auto merge of #9244 : thestinger/rust/drop, r=catamorphismbors-2/+2
This doesn't close any bugs as the goal is to convert the parameter to by-value, but this is a step towards being able to make guarantees about `&T` pointers (where T is Freeze) to LLVM.
2013-09-17auto merge of #9239 : steveklabnik/rust/rustpkg_tutorial, r=catamorphismbors-0/+225
First shot at a new tutorial for rustpkg. /cc @catamorphism Right now, I'm linking to my sample package on GitHub, I'm not sure that everyone would be comfortable with me having that there. Maybe under the mozilla org? I think having one to install and hold up as a default makes sense.
2013-09-16switch Drop to `&mut self`Daniel Micay-2/+2
2013-09-16Updating rustpkg tutorial from feedback.Steve Klabnik-37/+16
2013-09-16New rustpkg tutorial.Steve Klabnik-0/+246
2013-09-16auto merge of #9223 : sfackler/rust/tasks-fix, r=catamorphismbors-4/+2
This module was removed a while ago, but the tasks tutorial wasn't updated, and the old docs page for pipes was never deleted so the link confusingly still worked!
2013-09-15Remove references to std::pipes from task tutorialSteven Fackler-4/+2
This module was removed a while ago, but the tasks tutorial wasn't updated, and the old docs page for pipes was never deleted so the link confusingly still worked!
2013-09-15Remove {uint,int,u64,i64,...}::from_str,from_str_radixblake2-ppc-18/+18
Remove these in favor of the two traits themselves and the wrapper function std::from_str::from_str. Add the function std::num::from_str_radix in the corresponding role for the FromStrRadix trait.
2013-09-14auto merge of #9115 : erickt/rust/master, r=ericktbors-2/+3
This is a series of patches to modernize option and result. The highlights are: * rename `.unwrap_or_default(value)` and etc to `.unwrap_or(value)` * add `.unwrap_or_default()` that uses the `Default` trait * add `Default` implementations for vecs, HashMap, Option * add `Option.and(T) -> Option<T>`, `Option.and_then(&fn() -> Option<T>) -> Option<T>`, `Option.or(T) -> Option<T>`, and `Option.or_else(&fn() -> Option<T>) -> Option<T>` * add `option::ToOption`, `option::IntoOption`, `option::AsOption`, `result::ToResult`, `result::IntoResult`, `result::AsResult`, `either::ToEither`, and `either::IntoEither`, `either::AsEither` * renamed `Option::chain*` and `Result::chain*` to `and_then` and `or_else` to avoid the eventual collision with `Iterator.chain`. * Added a bunch of impls of `Default` * Added a `#[deriving(Default)]` syntax extension * Removed impls of `Zero` for `Option<T>` and vecs.
2013-09-13rustc/rustpkg: Use a target-specific subdirectory in build/ and lib/Tim Chevalier-9/+15
As per rustpkg.md, rustpkg now builds in a target-specific subdirectory of build/, and installs libraries into a target-specific subdirectory of lib. Closes #8672
2013-09-12Document the Zero traitErick Tryzelaar-2/+3
2013-09-11auto merge of #9039 : singingboyo/rust/update-for-expr-docs, r=thestingerbors-17/+4
The old documentation for for loops/expressions has been quite wrong since the change to iterators. This updates the docs to make them relevant to how for loops work now, if not very in-depth. There may be a need for updates giving more depth on how they work, such as detailing what method calls they make, but I don't know enough about the implementation to include that.
2013-09-09rename `std::iterator` to `std::iter`Daniel Micay-1/+1
The trait will keep the `Iterator` naming, but a more concise module name makes using the free functions less verbose. The module will define iterables in addition to iterators, as it deals with iteration in general.
2013-09-07Update for_expr docs.Brandon Sanderson-17/+4
2013-09-06Fix #6031. Allow symbolic log levels, not just numbers.novalis-3/+5
2013-09-04Implement support for indicating the stability of items.Huon Wilson-1/+57
There are 6 new compiler recognised attributes: deprecated, experimental, unstable, stable, frozen, locked (these levels are taken directly from Node's "stability index"[1]). These indicate the stability of the item to which they are attached; e.g. `#[deprecated] fn foo() { .. }` says that `foo` is deprecated. This comes with 3 lints for the first 3 levels (with matching names) that will detect the use of items marked with them (the `unstable` lint includes items with no stability attribute). The attributes can be given a short text note that will be displayed by the lint. An example: #[warn(unstable)]; // `allow` by default #[deprecated="use `bar`"] fn foo() { } #[stable] fn bar() { } fn baz() { } fn main() { foo(); // "warning: use of deprecated item: use `bar`" bar(); // all fine baz(); // "warning: use of unmarked item" } The lints currently only check the "edges" of the AST: i.e. functions, methods[2], structs and enum variants. Any stability attributes on modules, enums, traits and impls are not checked. [1]: http://nodejs.org/api/documentation.html [2]: the method check is currently incorrect and doesn't work.
2013-09-01auto merge of #8276 : kballard/rust/iterator-protocol, r=cmrbors-2/+35
r? @thestinger
2013-08-30doc/rust.md: Missing in keyword on keyword list.Carlos-1/+1
2013-08-29Make the iterator protocol more explicitKevin Ballard-2/+35
Document the fact that the iterator protocol only defines behavior up until the first None is returned. After this point, iterators are free to behave how they wish. Add a new iterator adaptor Fuse<T> that modifies iterators to return None forever if they returned None once.
2013-08-28doc: Remove statement about scheduling randomnessBrian Anderson-15/+0
The new scheduler is not currently that random.
2013-08-27librustc: Fix merge falloutPatrick Walton-1/+1
2013-08-27auto merge of #8777 : Kimundi/rust/doc_stuff, r=cmrbors-151/+576
2013-08-27Rewrote module tutorialMarvin Löbel-151/+576
2013-08-26doc: Link condition and error-handling tutorial from main tutorialblake2-ppc-0/+1
2013-08-23Talk about trait bounds in the tutorial.Ben Blum-1/+31
2013-08-23auto merge of #8692 : kballard/rust/ffi-tutorial-c_str, r=huonwbors-3/+2
The FFI tutorial still incorrectly stated that strings were terminated with
2013-08-23auto merge of #8682 : adridu59/rust/master, r=cmrbors-0/+12
2013-08-22Clarify use_decl module resolution docs.Brandon Sanderson-0/+32
2013-08-22Update FFI tutorial to reference `c_str::to_c_str`Kevin Ballard-3/+2
The FFI tutorial still incorrectly stated that strings were terminated with \0 and suggested using `str::as_c_str`.
2013-08-22doc: add range iterators in the for loop sectionAdrien Tétar-0/+12