about summary refs log tree commit diff
path: root/src/doc/tutorial.md
AgeCommit message (Collapse)AuthorLines
2014-08-04docs: Fix typo in tutorial.Ruud van Asseldonk-1/+1
2014-07-31fix variable name in tutorialDJUrsus-1/+1
2014-07-24libsyntax: Remove `~self` and `mut ~self` from the language.Patrick Walton-3/+3
This eliminates the last vestige of the `~` syntax. Instead of `~self`, write `self: Box<TypeOfSelf>`; instead of `mut ~self`, write `mut self: Box<TypeOfSelf>`, replacing `TypeOfSelf` with the self-type parameter as specified in the implementation. Closes #13885. [breaking-change]
2014-07-20auto merge of #15745 : treeman/rust/tutorial-fixup, r=steveklabnikbors-22/+48
Simplify example in 5.2 to remove hidden `#[deriving(Show)]`. Traits haven't been introduced yet and now it's easier to just type in the code and expect it to work. Add in some examples for constructing the enum types. Explicitly expose `#![feature(struct_variant)]` in the code to make it more transparent, this bit me when I worked through the tutorial. Add references in chapter 8 to later chapters describing `Rc`, `Gc` and `Send`. This is a simple fix for #15293. Simplify vector indexing example in chapter 13 and removed hidden, unnecessary, code. Gave an example usage of the derived `Rand` trait in chapter 17. Removed references to removed 'extra' crate.
2014-07-17librustc: Remove cross-borrowing of `Box<T>` to `&T` from the language,Patrick Walton-6/+4
except where trait objects are involved. Part of issue #15349, though I'm leaving it open for trait objects. Cross borrowing for trait objects remains because it is needed until we have DST. This will break code like: fn foo(x: &int) { ... } let a = box 3i; foo(a); Change this code to: fn foo(x: &int) { ... } let a = box 3i; foo(&*a); [breaking-change]
2014-07-17Small fixes for tutorial.Jonas Hietala-22/+48
5.2 Simplify example to remove hidden #[deriving(Show)]. Add example for constructing the enums. 8 Reference later sections describing rc, gc and send. Fix for #15293. 13 Simplify BananaMania example to remove hidden code. 17 Gave an example using the derived Rand trait. Removed references to removed 'extra' crate.
2014-07-17deprecate Vec::getNick Cameron-1/+1
2014-07-15doc: missing quote in keyword SendYazhong Liu-1/+1
2014-07-04add a missing closing parensdgoon-1/+1
2014-07-03correct a few spelling mistakes in the tutorialNathan Froyd-3/+3
2014-06-29librustc: Remove the fallback to `int` for integers and `f64` forPatrick Walton-25/+24
floating point numbers for real. This will break code that looks like: let mut x = 0; while ... { x += 1; } println!("{}", x); Change that code to: let mut x = 0i; while ... { x += 1; } println!("{}", x); Closes #15201. [breaking-change]
2014-06-27auto merge of #15166 : ↵bors-5/+6
zookoatleastauthoritycom/rust/13570-add-see-below-to-a-reference-to-a-new-concept-2, r=huonw This is the same patch as submitted to https://github.com/rust-lang/rust/issues/13570 and https://github.com/rust-lang/rust/pull/14124, but with @pnkfelix's comment (https://github.com/rust-lang/rust/pull/14124#issuecomment-42797536) addressed, and with reflow as a separate commit. I'm submitting it in case @steveklabnik hasn't yet merged a rewrite of the tutorial (https://github.com/rust-lang/rust/issues/13570#issuecomment-46864789), in which case this patch might as well be merged into the old tutorial.
2014-06-25auto merge of #15121 : steveklabnik/rust/matching_docs, r=alexcrichtonbors-3/+8
Fixes #11113.
2014-06-25Make an example more clear with sample code.Steve Klabnik-3/+8
Fixes #11113.
2014-06-25reflow with emacs fill-paragraph (fill-column 71)Zooko Wilcox-O'Hearn-5/+6
2014-06-25add "(see below)" to a reference to a new conceptZooko Wilcox-O'Hearn-1/+1
This is because I observed someone reading the tutorial who thought they'd missed something when they got to the mention of variable bindings. This patch doesn't reflow the paragraphs so that you can see the semantic change that I made, and a subsequent patch will reflow this paragraph. Fixes https://github.com/rust-lang/rust/issues/13570.
2014-06-24Fix grammar in tutorialMichael Zhou-1/+1
"as this document" should be "than this document"
2014-06-24Add the Guide, add warning to tutorial.Steve Klabnik-0/+7
In line with what @brson, @cmr, @nikomatsakis and I discussed this morning, my redux of the tutorial will be implemented as the Guide. This way, I can work in small iterations, rather than dropping a huge PR, which is hard to review. In addition, the community can observe my work as I'm doing it. This adds a note in line with [this comment][reddit] that clarifies the state of the tutorial, and the community's involvement with it. [reddit]: http://www.reddit.com/r/rust/comments/28bew8/rusts_documentation_is_about_to_drastically/ci9c98k
2014-06-24Improve ambiguous pronoun.Steve Klabnik-3/+4
Fixes #14806
2014-06-24librustc: Remove the fallback to `int` from typechecking.Niko Matsakis-18/+18
This breaks a fair amount of code. The typical patterns are: * `for _ in range(0, 10)`: change to `for _ in range(0u, 10)`; * `println!("{}", 3)`: change to `println!("{}", 3i)`; * `[1, 2, 3].len()`: change to `[1i, 2, 3].len()`. RFC #30. Closes #6023. [breaking-change]
2014-06-23Docs: tutorial: Remove a couple references to `~T`Ivan Petkov-4/+5
2014-06-22Update few files after comparison traits renamingPiotr Jawniak-2/+2
There were still Total{Ord,Eq} in docs and src/etc
2014-06-17tutorial.md: tiny correction for --crate-type=libNiklas Koep-1/+1
Compiling a crate with `rustc --crate-type=lib` produces an rlib file, not a shared object. The latter is only produced for `--crate-type=dylib`.
2014-06-16Update Sublime Rust github linkChristopher Bergqvist-1/+1
Package switched maintainer from dbp to jhasse as stated in the README.md at the old link.
2014-06-16Update repo locationBrian Anderson-4/+4
2014-06-15Register new snapshotsAlex Crichton-2/+2
2014-06-11auto merge of #14799 : mcreinhard/rust/tilde-fix, r=alexcrichtonbors-1/+1
Replaced `~Drawable` with `Box<Drawable>` in tutorial
2014-06-11rustc: Move the AST from @T to Gc<T>Alex Crichton-3/+3
2014-06-10Fix deprecated use of ~Michael Reinhard-1/+1
2014-06-06doc: Turn off special features for rustdoc testsAlex Crichton-0/+3
These were only used for the markdown tests, and there's no reason they should be distinct from the other tests.
2014-06-05Fallout from the libcollections movementAlex Crichton-2/+1
2014-06-02docs: Stop using `notrust`Florian Gilcher-10/+10
Now that rustdoc understands proper language tags as the code not being Rust, we can tag everything properly. This change tags examples in other languages by their language. Plain notations are marked as `text`. Console examples are marked as `console`. Also fix markdown.rs to not highlight non-rust code.
2014-05-31Rename variable in tutorialChristoph Burgdorf-3/+3
Renamed `owned_box` to `on_the_heap` to use a consistent naming across the tutorial and the life time guide. Also it makes the example easier to grasp.
2014-05-31auto merge of #14553 : reem/rust/nuke-owned-vectors, r=alexcrichtonbors-9/+9
I removed all remaining deprecated owned vectors from the docs. All example tests pass.
2014-05-30Remove deprecated owned vector from tutorial.Jonathan Reem-9/+9
2014-05-30std: Rename {Eq,Ord} to Partial{Eq,Ord}Alex Crichton-15/+15
This is part of the ongoing renaming of the equality traits. See #12517 for more details. All code using Eq/Ord will temporarily need to move to Partial{Eq,Ord} or the Total{Eq,Ord} traits. The Total traits will soon be renamed to {Eq,Ord}. cc #12517 [breaking-change]
2014-05-29Revert erroneous fix to tutorialRandati-1/+1
2014-05-27Move std::{reflect,repr,Poly} to a libdebug crateAlex Crichton-10/+20
This commit moves reflection (as well as the {:?} format modifier) to a new libdebug crate, all of which is marked experimental. This is a breaking change because it now requires the debug crate to be explicitly linked if the :? format qualifier is used. This means that any code using this feature will have to add `extern crate debug;` to the top of the crate. Any code relying on reflection will also need to do this. Closes #12019 [breaking-change]
2014-05-27auto merge of #14414 : richo/rust/features/nerf_unused_string_fns, ↵bors-2/+2
r=alexcrichton This should block on #14323
2014-05-27std: Rename strbuf operations to stringRicho Healey-2/+2
[breaking-change]
2014-05-27auto merge of #14429 : sanrodari/rust/patch-1, r=sfacklerbors-1/+1
2014-05-26auto merge of #14374 : swgillespie/rust/swgillespie-tutorial, r=alexcrichtonbors-11/+18
The current tutorial says that the only way to get master is to build from source, which isn't true anymore - nightly binaries and an installer for Mac OS X are now available at the install page: http://www.rust-lang.org/install.html . Feedback very much welcome! Addresses issue #13578.
2014-05-25Update tutorial, see issue #13578Sean Gillespie-12/+19
2014-05-25Fix to tutorialSantiago Rodriguez-1/+1
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-6/+6
[breaking-change]
2014-05-24Get "make check" to work with unused-attributeSteven Fackler-0/+5
There's a fair number of attributes that have to be whitelisted since they're either looked for by rustdoc, in trans, or as needed. These can be cleaned up in the future.
2014-05-23auto merge of #14362 : zecozephyr/rust/docfixes, r=cmrbors-1/+1
extra::arc -> alloc::arc
2014-05-22Fixed incorrect module pathJonathan Bailey-1/+1
extra::arc -> sync::arc
2014-05-21Change static.rust-lang.org to doc.rust-lang.orgAlex Crichton-5/+5
The new documentation site has shorter urls, gzip'd content, and index.html redirecting functionality.
2014-05-21Updated doc with correct type.Jonathan Bailey-1/+1