about summary refs log tree commit diff
path: root/src/doc/guide.md
AgeCommit message (Collapse)AuthorLines
2014-10-13rollup merge of #17992 : jkleint/guide-double-borrowAlex Crichton-3/+2
2014-10-13rollup merge of #17986 : gamazeps/docissueAlex Crichton-2/+2
2014-10-12Guide: specify that both shared and mutable borrows can be re-lent.John Kleint-3/+2
2014-10-13Fixes small error on the doc (task part)Felix Raimundo-2/+2
2014-10-12Guide: remove promise of a counter in the guessing game.John Kleint-2/+1
Issue #17964.
2014-10-08auto merge of #17843 : coffeejunk/rust/guide-macros, r=steveklabnikbors-55/+13
The old version switched in between examples from the value `5i` to `"Hello"` and back. Additionally, the code generated by `rustc print.rs --pretty=expanded` is not as verbose anymore.
2014-10-08auto merge of #17836 : typelist/rust/guide-tuples, r=steveklabnikbors-4/+15
Currently, the Guide says tuples "are only equivalent if the arity, types, and values are all identical", before presenting an example that uses `==` to compare two tuples whose arity and contained types match. This is misleading, because it implies that `==` can dynamically check whether two tuples have the same arity and contained types, whereas trying to do this would lead to a compiler error. I tried to avoid destroying the flow of this section, but I'm not sure if I've been successful.
2014-10-07Guide: Fix inconsistency in 'Marcos' sectionMaximilian Haack-55/+13
The old version switched in between examples from the value `5i` to `"Hello"` and back. Additionally, the code generated by `rustc print.rs --pretty=expanded` is not as verbose anymore.
2014-10-07Clarify that assigning/comparing different tuple types to one another won't ↵Johannes Muenzel-4/+15
compile
2014-10-06doc: Update output of `rustc --version`Brian Anderson-1/+1
2014-10-04auto merge of #17754 : O-I/rust/update-guide, r=steveklabnikbors-17/+16
Hi, These are a few small edits to the Guide that I made while reading online. Really well done and approachable. I have a few questions below, but I don't know if this is the proper place to ask them, so feel free to ignore the below. 1. Trailing commas seem to be a convention in Rust and are used quite a bit throughout the Guide, but are never explicitly mentioned. Maybe adding a short mention about them when they first appear in the Structs section might be helpful to those who are unfamiliar with or don't use them in other languages. 2. In the Iterators section, there is a block of code like this: ```rust let mut range = range(0i, 10i); loop { match range.next() { Some(x) => { println!("{}", x); } // no comma needed? None => { break } } } ``` My inclination would be to put a comma where the comment is to separate the two arms to get this to compile, but it runs fine either way. Is there a convention on commas for scenarios like this where each arm is enclosed in `{}`? All the best, O-I
2014-10-03Adds commaRahul Horé-1/+1
Oddly (to me), this code runs fine without the comma separating the `Some` and `None` arms of the `match` construct. It seems like Rust doesn't require you to separate arms with commas if all the expressions are enclosed in braces.
2014-10-03Fixes wordingRahul Horé-2/+2
2014-10-03Removes extra .Rahul Horé-1/+1
2014-10-03Adds missing cdRahul Horé-1/+2
2014-10-03Use similar syntax in all armsRahul Horé-7/+5
See issue #17672. This was started in commit ee1cbb9c71bfab8500dfabedb35ba63dd1e5b7ff, but there were a few more lines to update.
2014-10-03Fixes outputRahul Horé-1/+1
2014-10-03Adds trailing commaRahul Horé-2/+2
2014-10-03Fixes spacingRahul Horé-2/+2
2014-10-03Update signature of try_recv()Steve Klabnik-1/+1
2014-10-03auto merge of #16995 : kmcallister/rust/plugin-tutorial, r=alexcrichtonbors-4/+4
@steveklabnik, are you interested in looking this over?
2014-10-02rollup merge of #17717 : steveklabnik/gh17190Alex Crichton-3/+5
2014-10-02rollup merge of #17698 : jistr/guide_exportAlex Crichton-3/+3
2014-10-02extra comment about macrosSteve Klabnik-3/+5
Fixes #17190
2014-10-01Fix incorrect statement about ok()Steve Klabnik-5/+5
Fixes #17676.
2014-10-01Don't compare () to null.Steve Klabnik-8/+6
Fixes #17671.
2014-10-01use similar syntax in all armsSteve Klabnik-1/+1
Fixes #17672
2014-10-01Use relative doc URLs in top-level guidesKeegan McAllister-4/+4
2014-10-01Guide: clarify exportingJiří Stránský-3/+3
Mention that using `pub` is called exporting. Remove that `use` is called re-exporting, because `pub use` should be called re-exporting. The guide currently doesn't cover `pub use`.
2014-09-30librustc: Forbid `..` in range patterns.Patrick Walton-4/+4
This breaks code that looks like: match foo { 1..3 => { ... } } Instead, write: match foo { 1...3 => { ... } } Closes #17295. [breaking-change]
2014-09-29rollup merge of #17510 : MatejLach/find_fixAlex Crichton-2/+0
2014-09-29auto merge of #17535 : Manishearth/rust/patch-2, r=steveklabnikbors-0/+1
It's a rather useful syntax, and non-obvious. A friend of mine is learning Rust and was trying to find a way to easily do such an initialization — he couldn't find it in the guide and was pretty surprised when I showed him. Looks like something that should be mentioned. r? @steveklabnik
2014-09-26Mention array sugar in guideManish Goregaokar-0/+1
2014-09-25Correct tenseMatej Lach-1/+1
2014-09-24Correct typo in the Iterator adapters sectionMatej Lach-1/+1
2014-09-24Remove unnecessary code from an exampleMatej Lach-2/+0
2014-09-23auto merge of #17366 : ohazi/rust/master, r=steveklabnikbors-5/+1
See: http://doc.rust-lang.org/std/from_str/trait.FromStr.html ``` let input_num = from_str::<Option<uint>>("5"); ``` ``` <anon>:2:21: 2:45 error: failed to find an implementation of trait std::from_str::FromStr for core::option::Option<uint> <anon>:2 let input_num = from_str::<Option<uint>>("5"); ^~~~~~~~~~~~~~~~~~~~~~~~ ```
2014-09-19rollup merge of #17350 : pablobm/doc-fixAlex Crichton-2/+0
2014-09-18from_str has an impl for uint, not Option<uint>Oren Hazi-5/+1
2014-09-17Fix warning and make code follow the text betterPablo Brasero-2/+0
2014-09-17rollup merge of #17294 : theevocater/masterAlex Crichton-2/+5
2014-09-17rollup merge of #17278 : steveklabnik/gh17242Alex Crichton-2/+2
2014-09-17rollup merge of #17277 : steveklabnik/doc_fix_rollupAlex Crichton-13/+8
2014-09-17auto merge of #17227 : tshepang/rust/stronger-break, r=aturonbors-1/+1
Remove trailing whitespace while at it
2014-09-16Fallout from renamingAaron Turon-1/+1
2014-09-16Update triple per commentsJake Kaufman-1/+1
2014-09-16auto merge of #17244 : spastorino/rust/patch-1, r=alexcrichtonbors-3/+3
2014-09-15Correct windows install link in guideJake Kaufman-2/+5
This closes #17260. The guide references the old install location for the windows rust install before it was split into 64bit and 32bit installers. This adds a link to each binary.
2014-09-15use _sample configurations..._ rather than _here_ as link textDan Connolly-2/+2
2014-09-15remove rendundant functionSteve Klabnik-4/+3
Fixes #17230.