Alex Crichton
f006e86eed
rollup merge of #17992 : jkleint/guide-double-borrow
2014-10-13 15:10:08 -07:00
Alex Crichton
ad25e560a0
rollup merge of #17986 : gamazeps/docissue
2014-10-13 15:10:01 -07:00
John Kleint
ed7d1be12f
Guide: specify that both shared and mutable borrows can be re-lent.
2014-10-12 23:50:22 -04:00
Felix Raimundo
1cbce309fe
Fixes small error on the doc (task part)
2014-10-13 00:13:41 +02:00
John Kleint
67418f5509
Guide: remove promise of a counter in the guessing game.
...
Issue #17964 .
2014-10-12 15:24:39 -04:00
bors
afb5fcd553
auto merge of #17843 : coffeejunk/rust/guide-macros, r=steveklabnik
...
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-08 17:52:08 +00:00
bors
0606234880
auto merge of #17836 : typelist/rust/guide-tuples, r=steveklabnik
...
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-08 01:02:10 +00:00
Maximilian Haack
e656affa79
Guide: Fix inconsistency in 'Marcos' section
...
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-07 13:12:27 +02:00
Johannes Muenzel
c211d132c3
Clarify that assigning/comparing different tuple types to one another won't compile
2014-10-07 01:43:18 -04:00
Brian Anderson
25e81d2f5f
doc: Update output of rustc --version
2014-10-06 16:22:44 -07:00
bors
8794107f74
auto merge of #17754 : O-I/rust/update-guide, r=steveklabnik
...
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-04 04:27:05 +00:00
Rahul Horé
9040948ef3
Adds comma
...
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-03 16:40:58 -04:00
Rahul Horé
083b46dd29
Fixes wording
2014-10-03 15:59:57 -04:00
Rahul Horé
0eb4df9ace
Removes extra .
2014-10-03 15:41:59 -04:00
Rahul Horé
d3f8f8a849
Adds missing cd
2014-10-03 14:47:57 -04:00
Rahul Horé
816c56e1d5
Use similar syntax in all arms
...
See issue #17672 . This was started in commit ee1cbb9c71
, but there were a few more lines to update.
2014-10-03 14:41:55 -04:00
Rahul Horé
060224af68
Fixes output
2014-10-03 13:59:32 -04:00
Rahul Horé
e8ddad18e8
Adds trailing comma
2014-10-03 13:50:42 -04:00
Rahul Horé
8a6342f751
Fixes spacing
2014-10-03 13:37:05 -04:00
Steve Klabnik
71f752bbc4
Update signature of try_recv()
2014-10-03 11:58:52 -04:00
bors
9a2286d3a1
auto merge of #16995 : kmcallister/rust/plugin-tutorial, r=alexcrichton
...
@steveklabnik, are you interested in looking this over?
2014-10-03 07:33:26 +00:00
Alex Crichton
005ae8e3dd
rollup merge of #17717 : steveklabnik/gh17190
2014-10-02 14:50:46 -07:00
Alex Crichton
6ee3c2854f
rollup merge of #17698 : jistr/guide_export
2014-10-02 14:50:27 -07:00
Steve Klabnik
85a8b92b51
extra comment about macros
...
Fixes #17190
2014-10-02 15:12:27 -04:00
Steve Klabnik
dc35a53d15
Fix incorrect statement about ok()
...
Fixes #17676 .
2014-10-01 17:16:34 -04:00
Steve Klabnik
e2357cf41b
Don't compare () to null.
...
Fixes #17671 .
2014-10-01 17:14:29 -04:00
Steve Klabnik
ee1cbb9c71
use similar syntax in all arms
...
Fixes #17672
2014-10-01 17:12:29 -04:00
Keegan McAllister
e3828026d5
Use relative doc URLs in top-level guides
2014-10-01 13:21:52 -07:00
Jiří Stránský
ac956c013f
Guide: clarify exporting
...
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-10-01 22:20:58 +02:00
Patrick Walton
416144b827
librustc: Forbid ..
in range patterns.
...
This breaks code that looks like:
match foo {
1..3 => { ... }
}
Instead, write:
match foo {
1...3 => { ... }
}
Closes #17295 .
[breaking-change]
2014-09-30 09:11:26 -07:00
Alex Crichton
1ebf456fb0
rollup merge of #17510 : MatejLach/find_fix
2014-09-29 08:10:32 -07:00
bors
eb816eee0f
auto merge of #17535 : Manishearth/rust/patch-2, r=steveklabnik
...
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-29 07:43:07 +00:00
Manish Goregaokar
1f4cd80ac5
Mention array sugar in guide
2014-09-26 00:00:27 +05:30
Matej Lach
9ca399f14e
Correct tense
2014-09-25 16:13:20 +01:00
Matej Lach
5a25537faf
Correct typo in the Iterator adapters section
2014-09-24 13:35:33 +01:00
Matej Lach
3c47d89614
Remove unnecessary code from an example
2014-09-24 12:39:16 +01:00
bors
7fbbfe6bf2
auto merge of #17366 : ohazi/rust/master, r=steveklabnik
...
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-23 20:20:41 +00:00
Alex Crichton
dbaa9300ac
rollup merge of #17350 : pablobm/doc-fix
2014-09-19 10:00:32 -07:00
Oren Hazi
c942df9fa5
from_str has an impl for uint, not Option<uint>
2014-09-18 00:52:42 -07:00
Pablo Brasero
17674e02fc
Fix warning and make code follow the text better
2014-09-17 21:05:16 +01:00
Alex Crichton
1921055dda
rollup merge of #17294 : theevocater/master
2014-09-17 08:49:31 -07:00
Alex Crichton
b27947ac4d
rollup merge of #17278 : steveklabnik/gh17242
2014-09-17 08:49:08 -07:00
Alex Crichton
b4bff574d2
rollup merge of #17277 : steveklabnik/doc_fix_rollup
2014-09-17 08:49:06 -07:00
bors
ff613abaa2
auto merge of #17227 : tshepang/rust/stronger-break, r=aturon
...
Remove trailing whitespace while at it
2014-09-17 03:46:15 +00:00
Aaron Turon
fc525eeb4e
Fallout from renaming
2014-09-16 14:37:48 -07:00
Jake Kaufman
7d00eb6133
Update triple per comments
2014-09-16 08:44:47 -07:00
bors
c09437ab2d
auto merge of #17244 : spastorino/rust/patch-1, r=alexcrichton
2014-09-16 11:11:03 +00:00
Jake Kaufman
2f35723170
Correct windows install link in guide
...
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-15 23:36:17 -07:00
Dan Connolly
2ee91ea437
use _sample configurations..._ rather than _here_ as link text
2014-09-15 13:40:16 -04:00
Steve Klabnik
51b4c515f4
remove rendundant function
...
Fixes #17230 .
2014-09-15 13:23:46 -04:00
Steve Klabnik
b45853860c
remove references to HM inference
...
Fixes #17229 .
2014-09-15 13:23:31 -04:00
Steve Klabnik
df6240dc9e
properly annotate C code in the guide
...
Without 'notrust,' we were getting a playpen link.
Fixes #17228 .
2014-09-15 13:23:12 -04:00
Santiago Pastorino
f8bbf6d0e1
rustc main.rs
generates main binary file
2014-09-13 22:25:38 -03:00
Markus Unterwaditzer
d36ac4def5
These two lines are actually three.
2014-09-13 15:16:59 +02:00
Tshepang Lekhonkhobe
46e3014ce0
doc: that felt like it needed a stronger break than what comma provides
...
Remove trailing whitespace while at it
2014-09-13 09:40:30 +02:00
bors
ccae356ace
auto merge of #17155 : steveklabnik/rust/dherman_fixes, r=brson
...
Fixing more suggestions from @dherman . I made them individual commits in case we want to discuss any of them further.
2014-09-12 23:30:54 +00:00
Steve Klabnik
a99ba25f2b
Replace the Tutorial with the Guide.
...
The Guide isn't 100% perfect, but it's basically complete. It's
certainly better than the tutorial is. Time to start pointing more
people its way.
I also just made it consistent to call all things 'guides' rather than
tutorials.
Fixes #9874 . This is the big one.
And two bugs that just go away.
Fixes #14503 .
Fixes #15009 .
2014-09-11 16:21:32 -04:00
Steve Klabnik
c3943b3c89
don't say 'semantic'
2014-09-10 18:30:28 -04:00
Steve Klabnik
8f7470d864
remove rich hickey love
2014-09-10 18:29:58 -04:00
Steve Klabnik
311227003f
Remove much of the modules section.
...
This part can get _really_ confusing, and we want to make sure that
people succeed in the guide. I plan on making a module guide in the
future to replace the information here.
2014-09-10 18:28:37 -04:00
Steve Klabnik
9c8c82b87d
hello_world.rs -> main.rs
2014-09-10 18:26:17 -04:00
Steve Klabnik
b85191ae0f
dave hates jokes 😉
2014-09-10 18:24:40 -04:00
Steve Klabnik
c8e5068ec9
Be explicit with rustdoc.
...
I missed some annotations, and some were in a different style.
2014-09-09 18:42:05 -04:00
Steve Klabnik
18f1f5a06e
guide: Remove reference to uninitialized bindings
...
There isn't a good way to fit this in, so let's just not
mention it.
Fixes #16792 .
2014-09-08 18:50:08 -04:00
bors
57781c3c30
auto merge of #17019 : steveklabnik/rust/remove_compromise, r=thestinger
...
@dherman doesn't like it 😄
2014-09-07 07:16:27 +00:00
Steve Klabnik
d929d83eec
don't say compromise
...
@dherman doesn't like it 😄
2014-09-05 06:38:53 -04:00
Steve Klabnik
12d66e6ac3
Fix formatting in the guide.
...
Thanks @dherman.
2014-09-05 06:37:22 -04:00
Joseph Crail
7241267b93
doc: Fix spelling errors.
2014-09-01 20:52:38 -04:00
Alex Crichton
33029c5ddd
rollup merge of #16881 : cmr/guide-typo
2014-08-30 23:49:01 -07:00
Alex Crichton
56a029f145
rollup merge of #16852 : steveklabnik/desugar_destructure
2014-08-30 23:48:11 -07:00
Alex Crichton
963861fa40
rollup merge of #16849 : nhowell/patch-1
2014-08-30 23:48:05 -07:00
Alex Crichton
d1a5b277a1
rollup merge of #16839 : treeman/issue-15358
2014-08-30 23:47:23 -07:00
Alex Crichton
89d1c9c48c
rollup merge of #16833 : SebastianZaha/fix-guide-typo
2014-08-30 23:47:12 -07:00
Alex Crichton
c50fffaa9a
rollup merge of #16832 : SebastianZaha/fix-inconsistent-version-numbering
2014-08-30 23:47:07 -07:00
Alex Crichton
c6fd2d31ee
rollup merge of #16807 : nham/guide_added_ownership_rule
2014-08-30 23:46:38 -07:00
Alex Crichton
e442406dd7
rollup merge of #16726 : tshepang/consistency
2014-08-30 23:45:44 -07:00
Alex Crichton
941b06b0bd
rollup merge of #16721 : tshepang/convenience
2014-08-30 23:45:41 -07:00
Alex Crichton
9fc29f1d2e
rollup merge of #16716 : tshepang/temp
2014-08-30 23:45:37 -07:00
nham
ea888edf63
doc: Add another restriction to the list of ownership rules.
2014-08-30 17:22:29 -04:00
Corey Richardson
02d96ac612
guide: function -> closure in explanation of closures
2014-08-30 12:39:52 -04:00
Tshepang Lekhonkhobe
d89b2a5c3d
doc: make docs build
...
Addresses this comment:
https://github.com/rust-lang/rust/pull/16721#issuecomment-53946624
2014-08-30 08:02:40 +02:00
Steve Klabnik
eb28237195
desugar -> destructure
...
wrong de- word.
2014-08-29 15:35:51 -04:00
Nick Howell
0a84308eba
Fix spelling mistakes in the guide
...
Also made some opinionated changes such as to prefer license over licence and judgment over judgement.
2014-08-29 11:23:21 -04:00
Jonas Hietala
5bf1b03e5c
Tweak error message for use of a keyword in ident position.
...
Closes #15358
2014-08-29 10:36:43 +02:00
Sebastian Zaha
6138e835f6
Fix guide typo.
2014-08-28 23:14:09 +02:00
Sebastian Zaha
5f919cd7aa
Cargo begins version number at 0.0.1 instead of 0.1.0.
2014-08-28 22:47:45 +02:00
bors
9669c6dc1a
auto merge of #16752 : MatejLach/rust/more_cargorun, r=steveklabnik
...
Use cargo run as much as possible...
2014-08-27 11:16:12 +00:00
bors
d860a667e7
auto merge of #16724 : tshepang/rust/misleading, r=brson
...
We have to specify the module and the function name in the example where
the module shares a crate with the executable as well, so remove the
redundant (and potentially confusing) mention.
2014-08-27 07:46:17 +00:00
Matej Lach
7bfcace03b
Use cargo run in more places
2014-08-26 19:40:11 +01:00
bors
3ae1059632
auto merge of #16720 : tshepang/rust/trailing-prompt, r=alexcrichton
...
because eyesore
2014-08-26 14:11:08 +00:00
bors
084325f2d9
auto merge of #16722 : tshepang/rust/trailing-spaces, r=pcwalton
2014-08-24 13:51:03 +00:00
Tshepang Lekhonkhobe
538ea3cd05
doc: slight consistency fix
...
Others in this list are Capitalized, so do it here too.
2014-08-24 13:51:42 +02:00
Tshepang Lekhonkhobe
4aff964463
doc: remove misleading/confusing info
...
We have to specify the module and the function name in the example where
the module shares a crate with the executable as well, so remove the
redundant (and potentially confusing) mention.
2014-08-24 13:10:59 +02:00
Tshepang Lekhonkhobe
3aa0a14af0
doc: remove trailing spaces from Guide
2014-08-24 12:26:45 +02:00
Tshepang Lekhonkhobe
2d723237db
doc: use the more convenient 'cargo run' command
...
This lovely command has already been introduced, so let's take advantage
of it.
2014-08-24 12:21:41 +02:00
Tshepang Lekhonkhobe
f4fb3ad9aa
doc: remove trailing shell prompts
...
because eyesore
2014-08-24 12:16:14 +02:00
Tshepang Lekhonkhobe
3e94401a64
doc: move misplaced comma
...
Also:
* Remove unseeming repetition.
* By now, the reader has already heard that Rust is safe by default, so
reduce the overlong sentence, making it easier to read.
2014-08-24 04:24:25 +02:00
Tshepang Lekhonkhobe
6d2fe2e885
doc: add missing word
2014-08-24 04:03:51 +02:00
Daniel Hofstetter
1777047a54
Guide: Make add_three_times_four() public
2014-08-23 15:06:29 +02:00
bors
b9326ca91c
auto merge of #16653 : steveklabnik/rust/module_wording, r=alexcrichton
...
@kimundi was a bit worried this was misleading.
2014-08-22 11:50:58 +00:00
bors
da796ededa
auto merge of #16635 : steveklabnik/rust/ordering_comment, r=huonw
...
This way people won't try to copy/paste it in.
This is provided as an alternate solution to #16003 . What do you think, @treeman?
2014-08-21 21:25:56 +00:00
Steve Klabnik
f6759924f4
fix module wording in guide
...
@kimundi was a bit worried this was misleading.
2014-08-21 12:14:59 -04:00
bors
6de570f817
auto merge of #16487 : steveklabnik/rust/guide_ownership, r=brson
...
Whew. This section was so important, I saved it for last.
/cc @wycats, @nikomatsakis
2014-08-21 09:55:54 +00:00
bors
20b3313c8c
auto merge of #16471 : EduardoBautista/rust/chapter-14-fixes, r=steveklabnik
...
Just some small fixes for the guide. The cargo stuff is probably because of an update.
2014-08-21 06:05:58 +00:00
bors
e052aa65db
auto merge of #16447 : steveklabnik/rust/guide_vectors_extra, r=brson
...
Can't believe I forgot this!
2014-08-21 04:20:57 +00:00
bors
4dfdc697e9
auto merge of #16331 : steveklabnik/rust/guide_macros_and_unsafe, r=brson
...
The last two sections of the guide, and a small conclusion. I suck at conclusions.
I also realized I never covered strings, so I'm going to put that section up before we're actually 'done.'
2014-08-21 00:51:00 +00:00
Steve Klabnik
139516685b
Guide: unsafe
2014-08-20 18:41:24 -04:00
Christoph Burgdorf
1f16437d47
fixes some syntax highlighting annotations
2014-08-20 23:23:07 +02:00
Steve Klabnik
d1e37399a2
Make note that Ordering is builtin.
...
This way people won't try to copy/paste it in.
2014-08-20 16:56:29 -04:00
Steve Klabnik
1681f43b91
Guide: macros
2014-08-20 14:42:27 -04:00
bors
43f040dac8
auto merge of #16408 : steveklabnik/rust/guide_iterators, r=brson
...
An introduction to iterators. I kinda like this, but I kinda don't. Hmmm.
2014-08-20 18:15:53 +00:00
bors
e11cb5bba7
auto merge of #16257 : steveklabnik/rust/guide_patterns, r=brson
...
Fixes #4417 .
2014-08-20 16:25:53 +00:00
Eduardo Bautista
48c0f596a7
Remove repeated section and make file path generic
2014-08-19 12:07:25 -07:00
Eduardo Bautista
6b26aaea3e
Use new Cargo starting version number
2014-08-19 12:07:17 -07:00
Eduardo Bautista
c9284cedeb
Use new Cargo file syntax
2014-08-19 12:07:10 -07:00
Eduardo Bautista
6d189220d1
input_num
is used is used instead of guess
further in the guide
2014-08-19 12:07:05 -07:00
Eduardo Bautista
7ebb392fa9
Cargo generates "Hello, world!" instead of "Hello world!"
2014-08-19 12:07:00 -07:00
Eduardo Bautista
63e99f999d
Cargo begins version number at 0.0.1 instead of 0.1.0
2014-08-19 12:06:49 -07:00
bors
ef0d49d78f
auto merge of #16585 : steveklabnik/rust/random_remarks, r=pcwalton
...
Fixes #15954 and #16354 .
2014-08-19 13:05:52 +00:00
bors
eaf810a219
auto merge of #16345 : EduardoBautista/rust/fix-error-message-in-guide, r=steveklabnik
...
Just some simple changes to the guide.
2014-08-19 03:11:12 +00:00
Steve Klabnik
c88feffde4
Make comment about small bias in %.
...
Fixes #16354 .
2014-08-18 17:46:18 -04:00
Steve Klabnik
f8a9211740
Explain modulo in the guide.
...
Fixes #15954
2014-08-18 15:38:47 -04:00
Steve Klabnik
c47dfbb16a
Guide: ownership
2014-08-18 13:27:44 -04:00
Steve Klabnik
88e62a96ce
Remove 'static analysis'
...
This has certain implications that are wrong.
Fixes #16299 .
2014-08-18 13:10:25 -04:00
bors
dbb0cee682
auto merge of #16474 : MatejLach/rust/cargorun_fix, r=steveklabnik
...
This fixes #16451 .
While moving things around, I also removed a bunch of unnecessary whitespace, however I can put it back in if that's undesired.
Thanks.
2014-08-14 23:01:17 +00:00
Steve Klabnik
3f9ff2e85c
Guide: array subscript notation
2014-08-14 16:06:23 -04:00
Steve Klabnik
baf305dbf2
Guide: iterators
2014-08-14 16:04:56 -04:00
Matej Lach
bede9ecdfe
Introduce the cargo run command earlier (squashed)
2014-08-13 20:26:18 +01:00
Andreas Tolfsen
0edc55dc21
Guide: Add missing integer type to section on if expressions
2014-08-13 15:58:12 +01:00
Steve Klabnik
ee3f07481f
Guide: patterns.
...
Fixes #4417 .
2014-08-12 15:33:01 -04:00
bors
9e191cdf3c
auto merge of #16427 : brson/rust/https, r=thestinger
2014-08-11 22:46:16 +00:00
Steve Klabnik
8175cba597
Guide: vectors
2014-08-11 16:21:41 -04:00
Brian Anderson
21a70b38ba
Update docs to use HTTPS for static.rust-lang.org addresses
...
cc #16123
2014-08-11 12:31:16 -07:00
Peer Aramillo Irizar
9151599ec8
Fix some minor issues in the guide.
2014-08-11 07:12:22 +02:00
bors
98f1b0fb68
auto merge of #16333 : steveklabnik/rust/guide_strings, r=brson
...
I _think_ this is the right place to introduce strings. It's a bit hard to talk about without understanding pointers and ownership, but you need to have some idea of what's going on...
2014-08-08 18:06:11 +00:00
Steve Klabnik
50ffe0ccab
Guide: method syntax
2014-08-08 10:39:48 -04:00
bors
c5b8d89b27
auto merge of #16309 : steveklabnik/rust/guide_tasks, r=brson
...
I wasn't 100% sure of what level of detail I wanted to go into things here. For example, 1:1 vs M:N tasks seems like a better distinction to leave to the Guide.
2014-08-08 07:26:15 +00:00
Eduardo Bautista
b1428279f1
Single curly braces instead of double are being used
2014-08-08 00:52:09 -05:00
Eduardo Bautista
59f23aec07
Update error message on compile
2014-08-08 00:47:47 -05:00
bors
87d2bf400c
auto merge of #16273 : steveklabnik/rust/guide_generics, r=brson
2014-08-08 02:01:16 +00:00
bors
8888d7c8e9
auto merge of #16206 : steveklabnik/rust/guide_lambdas, r=brson
2014-08-07 23:36:17 +00:00
Steve Klabnik
dac73ad3c1
Guide: Traits
2014-08-07 18:12:36 -04:00
Steve Klabnik
e0fa999891
Guide: strings
2014-08-07 16:37:39 -04:00
Steve Klabnik
b1435ed593
Guide: tasks
2014-08-07 15:21:57 -04:00
Steve Klabnik
aa8602e20a
Guide: closures
2014-08-07 14:11:14 -04:00
Daniel Hofstetter
c6c3f47f7c
Guide: Fix imports (times_four instead of add_four)
2014-08-06 09:51:02 +02:00
Steve Klabnik
057c9ae30a
Guide: generics
2014-08-05 13:47:32 -04:00
bors
cbdae97689
auto merge of #16234 : cakebaker/rust/rename_guessing_game_rs_to_main_rs, r=steveklabnik
...
Follow-up to #16215
2014-08-05 11:31:22 +00:00
Daniel Hofstetter
d0bd10b891
Rename guessing_game.rs to main.rs in guide
2014-08-04 16:41:37 +02:00
Daniel Hofstetter
c586bf21aa
Rename modules.rs to main.rs in guide
2014-08-04 16:23:46 +02:00
Daniel Hofstetter
7ba9c44b94
Remove "bin" section from Cargo.toml
2014-08-03 14:19:05 +02:00
bors
ed264286dd
auto merge of #16198 : cakebaker/rust/remove_unused_tuple_struct, r=steveklabnik
2014-08-03 08:11:10 +00:00
bors
4d4eb10230
auto merge of #16186 : steveklabnik/rust/guide_cargo_new, r=alexcrichton
...
Two commits here: one to add `cargo new` to the guide, and a second to mention the lockfile that Cargo now generates.
2014-08-02 23:36:09 +00:00
Daniel Hofstetter
867d8e6356
Remove unused tuple struct
2014-08-02 17:28:42 +02:00
bors
5bad333fec
auto merge of #16175 : EduardoBautista/rust/fix-guessing-game-appearing-early, r=steveklabnik
...
Solves: https://github.com/rust-lang/rust/issues/16162
2014-08-02 12:06:09 +00:00
bors
71a42807ad
auto merge of #16160 : EduardoBautista/rust/use-bang-at-end-of-hello-world, r=alexcrichton
...
Further into the guide "Hello, world!" is used instead of "Hello, world".
2014-08-02 05:06:11 +00:00
Steve Klabnik
2b9c5d2f74
Add note about Cargo.lock
2014-08-01 22:58:16 -04:00
Steve Klabnik
1a80dcbd56
Use cargo new.
...
Now that this feature exists, we should use it.
Fixes #16078
2014-08-01 22:58:01 -04:00
bors
d7cfc34a22
auto merge of #16119 : steveklabnik/rust/guide_pointers, r=brson
...
This is the next section of the guide, and it's on pointers. It's not done yet, as I need to write the section on ownership and borrowing, but I figured I'd share the rest now, to get feedback on the rest of it while I take some time to get that right.
2014-08-02 00:31:03 +00:00
Eduardo Bautista
69267b1e1d
Move caret under the 'x' variabe
2014-08-01 14:34:18 -05:00
Eduardo Bautista
ea92a5e90a
Use hello_world instead of the guessing_game
2014-08-01 14:30:52 -05:00
Eduardo Bautista
c0048dec4a
Be more consistent with "Hello, world!"
2014-07-31 23:02:22 -05:00
Steve Klabnik
a74197e3f1
Guide: pointers
...
Not the pointer guide, but the guide section on pointers.
Adding a section about patterns for after this, as well.
2014-07-31 14:39:16 -04:00
Steve Klabnik
6121d82d47
Guide: testing
2014-07-30 09:36:32 -04:00
Steve Klabnik
456c4494b8
New Guide: crates and modules
2014-07-29 12:50:25 -04:00
bors
83a8a56473
auto merge of #15899 : aochagavia/rust/guide, r=kballard
...
The removed code caused confusion because it is not clear that the type of `y` is actually `()`
2014-07-23 06:31:11 +00:00
Adolfo Ochagavía
2d1b87ce33
Remove misleading code example from The Guide
...
The removed code caused confusion because it is not clear that the type of `y` is actually `()`
2014-07-22 20:58:25 +02:00
Steve Klabnik
1e9f86b1dc
Guide: fix headings
2014-07-21 19:39:16 -04:00
Steve Klabnik
e8c9d21130
Guessing game explanation
...
We now build the game at the end of the first section.
I wanted to do it as we went along, but it's too hard with these fundamentals
not in place. The rest will do the 'as we go' approach, but I think this is
better.
2014-07-21 09:54:03 -07:00
Steve Klabnik
fca79e4726
Guide: improve error handling
2014-07-21 09:53:58 -07:00
David Vazgenovich Shakaryan
69127f2f4e
Fix typo.
2014-07-18 23:11:25 -07:00
Steve Klabnik
167533972f
Fix cargo install instructions
...
Cargo now comes with Rust
2014-07-15 16:26:22 -04:00
bors
b74562b0ae
auto merge of #15534 : steveklabnik/rust/guide_stdin, r=brson
2014-07-15 07:36:17 +00:00
bors
5cef16e9b3
auto merge of #15531 : steveklabnik/rust/guide_looping, r=brson
2014-07-15 05:56:19 +00:00
bors
b1ae09e52a
auto merge of #15434 : steveklabnik/rust/guide_match, r=brson
2014-07-15 01:21:22 +00:00
Brian Anderson
a9cf3233f7
Bump version to 0.12.0-pre
2014-07-11 11:26:58 -07:00
Steve Klabnik
6d9334d570
Remove car analogy.
...
This was super silly anyway.
Fixes #15539 .
2014-07-09 13:04:52 -04:00
bors
ec3efa8055
auto merge of #15422 : steveklabnik/rust/guide_compound_data_types, r=brson
...
I'm not happy about the hand-waving around `cmp`, but I'm not sure how to get around it.
2014-07-09 02:21:37 +00:00
bors
1c711db551
auto merge of #15374 : steveklabnik/rust/comments, r=brson
...
I'm leaving off `rustdoc` usage because it won't work unless this is a `pub fn`, and I want to talk about public/private in the context of modules. I'm also not mentioning `//!` because it is exclusively used to provide the overview of a module.
2014-07-09 00:36:40 +00:00
Steve Klabnik
17bb4af8fe
Guide: Standard input
2014-07-08 17:49:19 -04:00
Steve Klabnik
636aff144a
Guide: looping
2014-07-08 15:25:27 -04:00
Steve Klabnik
daea9f4ad9
Guide: match
2014-07-08 12:16:58 -04:00
Steve Klabnik
654a19b091
Guide: comments
2014-07-08 12:07:11 -04:00
Steve Klabnik
11c64f162f
Guide: complex data types
2014-07-08 12:00:47 -04:00
bors
51a7488532
auto merge of #15467 : brson/rust/guideversion, r=alexcrichton
2014-07-06 18:51:34 +00:00
bors
00a32f2f18
auto merge of #15456 : aochagavia/rust/guide, r=alexcrichton
...
Fixes https://github.com/rust-lang/rust/issues/15452
2014-07-06 13:26:35 +00:00
Brian Anderson
7b7d3c2458
doc: --version no longer displays the host triple
2014-07-05 17:54:24 -07:00
Adolfo Ochagavía
d6f8271602
Improved example in the Guide
...
Fixes https://github.com/rust-lang/rust/issues/15452
2014-07-05 18:19:08 +02:00
Mike Boutin
f37e202b53
rustc: Reorder error and note message to reduce confusion.
...
Moved note after error to reduce confusion when the pair appears in the
middle of other errors. Closes #13279 .
2014-07-04 17:28:04 -04:00
bors
5b11610ced
auto merge of #15343 : alexcrichton/rust/0.11.0-release, r=brson
2014-07-04 01:21:19 +00:00
Steve Klabnik
9868b65b15
Guide: add mutable binding section
...
Fixes #15334 .
2014-07-03 12:54:51 -07:00
Steve Klabnik
faf5d926ec
Guide: functions
...
Just a few words about functions and defining them.
2014-07-03 10:55:19 -07:00
Steve Klabnik
748b9477f8
Guide: if
2014-07-03 10:55:10 -07:00
Alex Crichton
ff1dd44b40
Merge remote-tracking branch 'origin/master' into 0.11.0-release
...
Conflicts:
src/libstd/lib.rs
2014-07-02 11:08:21 -07:00
Steve Klabnik
a55c508db6
Guide: variable bindings.
...
Whew! Who knew there was so much to say about variables.
We probably want to move the guessing game to the rust-lang org, rather than
just having it on my GitHub. Or, I could put the code inline. I think it'd be
neat to have it as a project, so people can pull it down with Cargo. Until we
make that decision, I'll just leave this here.
2014-07-01 20:27:37 -04:00
Steve Klabnik
c90950ea60
Re-arrange TOC.
...
I'm going to move testing to be right AFTER the guessing game. I wanted it
to be borderline TDD, but I think that, since the first example is just one
file, it might be a bit overkill.
I'm doing this in its own commit to hopefully avoid merge conflicts.
2014-07-01 12:53:15 -04:00
bors
db29e1b960
auto merge of #15247 : smenardpw/rust/patch-1, r=alexcrichton
...
./hello_world is not recognized on Windows.
We can type either hello_world or hello_world.exe to run the executable. I chose "hello_world.exe", which seems more conventional on Windows.
2014-06-30 23:06:35 +00:00
smenardpw
f6f1cf13d0
Little typo fix
...
- ./hello_world which is not recognized on Windows fixed.
- .exe extension added.
- Little rewriting.
2014-06-30 07:43:15 +02:00
Steve Klabnik
572234ceac
it -> Cargo
...
It wasn't clear if we needed to install Hello World or Cargo.
2014-06-29 21:51:41 -04:00
Alex Crichton
aa1163b92d
Update to 0.11.0
2014-06-27 12:50:16 -07:00