about summary refs log tree commit diff
path: root/src/doc/tutorial.md
AgeCommit message (Collapse)AuthorLines
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
2014-05-19Minor doc fixes in various placesPiotr Jawniak-1/+1
2014-05-16doc: Remove all uses of `~str` from the documentation.Patrick Walton-6/+6
2014-05-13add a line to the example to clarify semanticsZooko Wilcox-O'Hearn-1/+1
This is to clarify that match construct doesn't define a new variable, since I observed a person reading the Rust tutorial who seemed to incorrectly think that it did. Fixes https://github.com/mozilla/rust/issues/13571 .
2014-05-12Remove reference to MutexArcDerek Chiang (Enchi Jiang)-1/+1
2014-05-10Clarification of Slice, Vector and Arraymoonglum-3/+3
Especially in the tutorial beginners should not be confused with wrong terminology. It helps to know the right names for things when you want to find something in the documentation.
2014-05-08Handle fallout in documentationKevin Ballard-5/+6
Tweak the tutorial's section on vectors and strings, to slightly clarify the difference between fixed-size vectors, vectors, and slices.
2014-05-07auto merge of #13958 : pcwalton/rust/detilde, r=pcwaltonbors-66/+68
for `~str`/`~[]`. Note that `~self` still remains, since I forgot to add support for `Box<self>` before the snapshot. r? @brson or @alexcrichton or whoever
2014-05-07auto merge of #13914 : alexcrichton/rust/pile-o-rustdoc-fixes, r=brsonbors-1/+1
Lots of assorted things here and there, all the details are in the commits. Closes #11712
2014-05-06librustc: Remove `~EXPR`, `~TYPE`, and `~PAT` from the language, exceptPatrick Walton-66/+68
for `~str`/`~[]`. Note that `~self` still remains, since I forgot to add support for `Box<self>` before the snapshot. How to update your code: * Instead of `~EXPR`, you should write `box EXPR`. * Instead of `~TYPE`, you should write `Box<Type>`. * Instead of `~PATTERN`, you should write `box PATTERN`. [breaking-change]
2014-05-06Update multiple file use statement exampleBrandon Waskiewicz-8/+10
Update the example to make the usage of `pub mod foo;` much more apparent, as well as using an example where setting the visibility of the module is actually necessary.
2014-05-05doc: Corrected example in 17.8 Deriving implementations for traitsMike Boutin-1/+8
Corrected example to to use Rand trait referenced in preceding description and included an example using the Show trait to print ABC.
2014-05-05doc: Minor example formatting in 11 ReferencesMike Boutin-1/+1
2014-05-05doc: Clarified 4.2 Pattern matchingMike Boutin-13/+10
Combined redundant paragraphs about the match expression and removed a redundant example.
2014-05-05Update minimum g++ version in documentationJames Laverack-1/+1
Version changed due to a newer requirement in LLVM.
2014-05-04auto merge of #13676 : mdinger/rust/tutorial_doc, r=pnkfelixbors-17/+82
Improve tutorial discussion of closures, e.g. with respect to type inference and variable capture. Fix #13621 ---- original description follows I'd like this pulled to master if possible but if not I'd appreciate comments on what I need to change. I found the closures difficult to understand as they were so I tried to explain it so I would've had an easier time understanding it. I think it's better at least, somewhat. I don't know that everyone liked the `-> ()` I included but I thought explicit is best to aid understanding. I thought it was much harder to understand than it should have been. [EDIT] - Clicked too early. This doesn't `make check` without errors on my Xubuntu on Virtualbox machine. Not sure why. I don't think I changed anything problematic. I'll try `make check` on master tomorrow. Opened https://github.com/mozilla/rust/issues/13621 regarding this.
2014-05-03rustdoc: Migrate from sundown to hoedownAlex Crichton-1/+1
This primary fix brought on by this upgrade is the proper matching of the ``` and ~~~ doc blocks. This also moves hoedown to a git submodule rather than a bundled repository. Additionally, hoedown is stricter about code blocks, so this ended up fixing a lot of invalid code blocks (ending with " ```" instead of "```", or ending with "~~~~" instead of "~~~"). Closes #12776
2014-05-01Fix a/an typosJorge Aparicio-1/+1
2014-05-01auto merge of #13881 : aochagavia/rust/pr, r=alexcrichtonbors-1/+1
2014-05-01Fixed outdated note in the tutorialAdolfo Ochagavía-1/+1
2014-05-01rustdoc tutorial: grammar change in list commentsJustin Noah-3/+3
2014-04-30Suggested revisions to PR 13676.Felix S. Klock II-28/+53
Most important: distinguish function decl sugar for omitting `-> ()` from type inference on closures. I also tried to add a couple more examples to further emphasize this distinction. Note that this sugar (of omitting `-> ()`) is actually already briefly mentioned in an earlier section, so it is a little tricky deciding whether to put more material here, or to move it up to the previous section. Other drive-by fixes: * Fix the line length of the code blocks to fit in the width provided in the rendered HTML * Some minor revisions to wording (e.g. try to clarify in some cases where a type mismatch is arising).
2014-04-30Remove extra semicolonsmdinger-2/+2
2014-04-30Fix typomdinger-1/+1
2014-04-29auto merge of #13776 : adrientetar/rust/rustdoc-fix, r=brsonbors-9/+13
- Closes #13591. Relevant example: http://adrientetar.legtux.org/cached/rust-docs/struct.CChars.htm (Had to use `!important` to override CSS selector precedence, namely matching over parent class.) - Implement changes from #13780 feedback, namely: * Changed font-size from 18px to 15px * Reintroduced gray background for code samples * Tightened up the margins - Fix point 1 and point 4 of #13804. Samples: - [enum.FileType](http://adrientetar.legtux.org/cached/rust-docs/enum.FileType.htm) - [struct.CChars](http://adrientetar.legtux.org/cached/rust-docs/struct.CChars.htm) - [std](http://adrientetar.legtux.org/cached/rust-docs/std.htm) - [std::io](http://adrientetar.legtux.org/cached/rust-docs/io.htm). r? @brson
2014-04-27doc: Remove out-of-place debug! noteMichael Pratt-5/+0
As of cc6ec8df, the Owned closures example uses println! instead of debug!, making a note about seeing debug seem out-of-place in this section. Since debug! is not used elsewhere in the tutorial, remove the note entirely.
2014-04-27doc: perform some 80-chars wrappingsAdrien Tétar-9/+13
2014-04-22auto merge of #13683 : aochagavia/rust/pr, r=alexcrichtonbors-1/+1
Replaced "len" by "length", to match the given code example.
2014-04-22auto merge of #13673 : bmac/rust/utorial-fix, r=alexcrichtonbors-1/+1
This pr updates the "Additional tutorials" link in the scope section to match the "What next?" link in the table of contents.
2014-04-22Some more closure changesmdinger-33/+46
2014-04-22Fixed typo in tutorialAdolfo Ochagavía-1/+1
Replaced "len" by "length", to match the given code example.
2014-04-21auto merge of #13587 : adrientetar/rust/more-docs, r=brsonbors-16/+15
- Use Fira Sans for headlines, Heuristica for the body (Adobe Utopia derivative). Both are licensed under the SIL OFL license. (I didn't include BoldItalic because it is sparingly used.) - Split TOC into 2 columns for the docs except manual (too tall, too wide to be readable). - Some fixes to rustdoc, bring styles in coherency with eachother - A few tweaks Two examples: [modified tutorial](http://adrientetar.legtux.org/cached/rust-docs/tutorial.htm) and [modified manual](http://adrientetar.legtux.org/cached/rust-docs/manual.htm). Rustdoc got some fixes, here is [modified `enum.FileType`](http://adrientetar.legtux.org/cached/rust-docs/enum.FileType.htm), [modified `std`](http://adrientetar.legtux.org/cached/rust-docs/std.htm) and [modified `std::io`](http://adrientetar.legtux.org/cached/rust-docs/io.htm). #13484, #13485 follow-up. cc @brson
2014-04-21Update the "Additional tutorials" linkBrendan McLoughlin-1/+1
2014-04-20Fix call order to be the same as definition orderGary M. Josack-1/+1
2014-04-19Demonstrate accessing external variable in first examplemdinger-11/+16
2014-04-19doc: add webfonts and tweak the styles accordinglyAdrien Tétar-16/+15
2014-04-19Give more explanation when introducing closures mdinger-7/+29
2014-04-18Replace all ~"" with "".to_owned()Richo Healey-2/+2
2014-04-18Update the rest of the compiler with ~[T] changesAlex Crichton-4/+4