about summary refs log tree commit diff
path: root/doc/tutorial.md
AgeCommit message (Collapse)AuthorLines
2013-06-21fix text of tutorialsJoris Rehm-5/+5
2013-06-16Correct tutorial testsNiko Matsakis-3/+5
2013-06-16fix benchmark and the tutorialsDaniel Micay-7/+2
2013-06-12std: remove substr & str::count_*, methodise char_len, implement slice_chars.Huon Wilson-1/+1
The confusing mixture of byte index and character count meant that every use of .substr was incorrect; replaced by slice_chars which only uses character indices. The old behaviour of `.substr(start, n)` can be emulated via `.slice_from(start).slice_chars(0, n)`.
2013-06-08remove deprecated vec::{is_empty, len} functionsDaniel Micay-1/+1
2013-06-07auto merge of #7003 : alco/rust/tutorial-block-expr, r=bstriebors-4/+9
This is something that's only been briefly mentioned in the beginning of the tutorial and all of the closure examples within this subsection include only one expression between { and }.
2013-06-08A reminder that a block is a single expr in closuresAlexei Sholik-4/+9
This is something that's only been briefly mentioned in the beginning of the tutorial and all of the closure examples within this subsection include only one expression between { and }.
2013-06-08Mention `for` in the section on loopsAlexei Sholik-2/+5
The "4.3 Loops" section only describes `while` and `loop`. We then see `for` used in a code sample at the end of the "13. Vectors and strings" section, but it's explained for the first time only in the next section -- "14. Closures". It is worth mentioning it in "4.3 Loops".
2013-06-06tutorial: fix for-loop exampleRamkumar Ramachandra-4/+5
Although in the example function `each` works as expected with rust-0.6 (the latest release), it fails to even compile with `incoming` rust (see test/compile-fail/bad-for-loop-2.rs). Change the function to return a `bool` instead of `()`: this works fine with both versions of rust, and does not misguide potential contributors. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
2013-05-29librustc: Stop reexporting the standard modules from prelude.Patrick Walton-0/+5
2013-05-23Fix some std/extra language in the tutorialErick Tryzelaar-6/+5
2013-05-23more testing fallout from core->std/std->extra moveTed Horst-58/+58
2013-05-18replace old_iter::repeat with the Times traitDaniel Micay-1/+1
2013-05-16syntax: implement #[deriving(DeepClone)]. Fixes #6514.Huon Wilson-2/+2
2013-05-14Replace shared/unique by managed/owned in the tutorialYoungsoo Son-1/+1
2013-05-13doc: document the #[deriving] attribute.Huon Wilson-0/+21
Closes #4916.
2013-05-10Replace io::println by println as it is now included in prelude.rsOlivier Saut-31/+27
2013-05-03add gitattributes and fix whitespace issuesDaniel Micay-4/+4
2013-04-29tutorial: Fix 'self' to 'Self'ILYONG CHO-5/+4
2013-04-28make way for a new iter moduleDaniel Micay-1/+1
2013-04-26tutorial: rework the section on destructorsDaniel Micay-99/+33
This removes the comparison to manual memory management examples, because it requires too much existing knowledge. Implementing custom destructors can be covered in the FFI tutorial, where `unsafe` is already well explained.
2013-04-22Rename Div operator trait to Quot and Modulo operator trait to RemBrendan Zabarauskas-1/+1
2013-04-19Fix debug! usage in tutorialDan Luu-1/+1
2013-04-17Explain use of debug\! in tutorialDan Luu-0/+3
2013-04-10auto merge of #5773 : dunsmoreb/rust/incoming, r=bstriebors-1/+5
Updates the tutorial to include a simple definition for tuples in section 4.2. Fixes #5132.
2013-04-10Update destructuring to reference tuples section.Bryan Dunsmore-1/+2
2013-04-08auto merge of #5782 : zofrex/rust/doc-1-tuples, r=thestingerbors-1/+1
As per [the 0.6 release notes](https://github.com/mozilla/rust/wiki/Doc-detailed-release-notes#06-april-2013) single-element tuples are legal. I spotted a couple of places in the documentation that said otherwise, and propose these changes to them.
2013-04-08auto merge of #5775 : pavpanchekha/rust/patch-1, r=thestingerbors-1/+1
Change wrong field name in "Trait Inheritance" section.
2013-04-07Fixed typoPavel Panchekha-1/+1
Change wrong field name in "Trait Inheritance" section.
2013-04-07Include definition of tuples for destructuring.Bryan Dunsmore-1/+4
Updates the tutorial to include a simple definition for tuples in section 4.2. Fixes #5132.
2013-04-07Update tutorial: 1-tuples now existzofrex-1/+1
2013-04-05auto merge of #5721 : dhardy/rust/master, r=graydonbors-0/+32
This is some stuff which seemed to be missing to me (though I haven't read everything yet so hope I haven't missed the relevant section). A similar addition for borrowing handles is needed, but #5720 stumped me. Comments welcome.
2013-04-05Tutorial: spelling correction and move a failing test to an xfail-test ↵Diggory Hardy-1/+3
marked code block.
2013-04-04Tutorial: fix typoDiggory Hardy-4/+4
2013-04-04Tutorial: comment on how mutability applies to boxesDiggory Hardy-0/+30
2013-04-04auto merge of #5716 : dhardy/rust/master, r=thestingerbors-1/+1
2013-04-04Tutorial: rename variable to avoid confusion.Diggory Hardy-1/+1
2013-04-04auto merge of #5707 : brettcannon/rust/patch-1, r=thestingerbors-1/+1
The sentence "Remember that `(float, float)` is a tuple of two floats" sounds like you've already read a section on tuples, but that section comes later. Changing it to "Assuming that ..." makes it more about taking the writer's word that the syntax is how tuples are defined.
2013-04-03auto merge of #5710 : ajuckel/rust/patch-1, r=luqmanabors-1/+1
One word typo fix
2013-04-03Simple typo fixAnthony Juckel-1/+1
2013-04-03Update tut. to not sound like I missed a sectionBrett Cannon-1/+1
The sentence "Remember that `(float, float)` is a tuple of two floats" sounds like you've already read a section on tuples, but that section comes later. Changing it to "Assuming that ..." makes it more about taking the writer's word that the syntax is how tuples are defined.
2013-04-03rename Linear{Map,Set} => Hash{Map,Set}Daniel Micay-2/+2
2013-04-03hashmap: rm linear namespaceDaniel Micay-1/+1
2013-04-01tidy version numbers and copyright datesGraydon Hoare-5/+5
2013-04-01doc: Update tutorial description of coreBrian Anderson-23/+59
2013-03-31Update tutorial.mdLuqman Aden-2/+2
Change fn() -> &fn().
2013-03-29librustc: Remove `fail_unless!`Patrick Walton-5/+5
2013-03-29tutorial: add an example of freezing a managed boxDaniel Micay-4/+15
2013-03-29tutorial: improve the managed boxes sectionDaniel Micay-0/+14
2013-03-29tutorial: improve the owned boxes sectionDaniel Micay-5/+40