Huon Wilson
c32fb53cf9
std: remove str::{len, slice, is_empty} in favour of methods.
2013-06-10 23:02:54 +10:00
Daniel Micay
de367157b5
remove deprecated vec::{is_empty, len} functions
2013-06-08 23:19:30 -04:00
Huon Wilson
513d2292e5
std: remove foldr and alli methods in vec
2013-06-09 02:22:23 +10:00
Huon Wilson
ed299af625
std: remove fold[lr] in favour of iterators
2013-06-09 02:22:23 +10:00
bors
1cf57f7b67
auto merge of #7003 : alco/rust/tutorial-block-expr, r=bstrie
...
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-07 23:40:25 -07:00
Alexei Sholik
93b2ddfc88
A reminder that a block is a single expr in closures
...
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-08 04:10:50 +03:00
Alexei Sholik
83b68a2f69
Mention for
in the section on loops
...
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-08 03:17:56 +03:00
Ramkumar Ramachandra
dd923e3831
tutorial: fix for-loop example
...
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-06-06 19:43:16 +05:30
Alexei Sholik
c7b19b04cb
Fix duplicate words in the docs
2013-06-06 10:43:58 +03:00
Patrick Walton
8114d0e950
librustc: Disallow multiple patterns from appearing in a "let" declaration.
...
You can still initialize multiple variables at once with "let (x, y) = (1, 2)".
2013-06-04 21:45:42 -07:00
Tim Chevalier
5b09dca90b
docs: Mention recently-added rustpkg features in the rustpkg manual
2013-06-02 17:21:01 -07:00
Daniel Micay
ed93cc1987
fix tutorial lint warnings
2013-05-31 18:20:09 -04:00
Daniel Micay
29aba8033a
mv the raw pointer {swap,replace}_ptr to std::ptr
2013-05-31 10:31:26 -04:00
Gábor Horváth
0d9ea4e2d1
Minor grammar fix.
2013-05-30 15:26:25 +02:00
Gábor Horváth
9fd18a93b7
Minor style fix.
2013-05-30 15:24:08 +02:00
Gábor Horváth
e583d5a6b6
Minor documentation addition.
2013-05-30 15:20:30 +02:00
bors
31b2804fda
auto merge of #6825 : caitp/rust/issue-6824, r=Aatch
...
Show `int_suffix_size` to appear 0 or 1 times
Show `exponent | . dec_lit` to appear 0 or 1 times, to show why `3f;` is a valid number
2013-05-29 22:58:35 -07:00
Caitlin Potter
bfe141c4e1
Fixes #6824 - Correct scan_number() grammar
...
Show `int_suffix_size` to appear 0 or 1 times
Show `exponent | . dec_lit` to appear 0 or 1 times, to show why `3f;` is a valid number
2013-05-30 00:51:16 -04:00
Patrick Walton
206ab89629
librustc: Stop reexporting the standard modules from prelude.
2013-05-29 19:04:53 -07:00
Olivier Saut
dea6677251
Add a short section on ARC
2013-05-26 19:10:16 +02:00
bors
5787bf3093
auto merge of #6711 : catamorphism/rust/issue-5700, r=thestinger
...
r? @nikomatsakis
2013-05-24 01:04:40 -07:00
Tim Chevalier
248a669381
docs: Don't mention obsolete move operator, as per #5700
2013-05-23 20:27:56 -07:00
Erick Tryzelaar
cc4fabcb43
Fix some std/extra language in the tutorial
2013-05-23 17:58:30 -07:00
Ted Horst
34cfd2183b
more testing fallout from core->std/std->extra move
2013-05-23 15:06:29 -05:00
Corey Richardson
acf920fe4b
Add static_assert doc blurb
2013-05-22 13:13:29 -04:00
John Clements
b71a1ecea2
added and rewrote text for 'do' and 'for' loops
2013-05-20 11:49:21 -07:00
bors
9f671698e6
auto merge of #6106 : thestinger/rust/iter, r=bstrie
...
I don't have a strong opinion on the function vs. method, but there's no point in having both. I'd like to make a `repeat` adaptor like Python/Haskell for turning a value into an infinite stream of the value, so this has to at least be renamed.
2013-05-19 08:13:30 -07:00
Daniel Micay
d953a5ce43
replace old_iter::repeat with the Times trait
2013-05-18 04:57:21 -04:00
Olivier Saut
3e41639a5e
Add a small section on futures to the tutorial
2013-05-17 23:11:49 +02:00
Huon Wilson
cd2eb4701f
syntax: implement #[deriving(DeepClone)]. Fixes #6514 .
2013-05-16 22:55:08 +10:00
bors
2fc6b0998b
auto merge of #6475 : sonwow/rust/tutorials, r=brson
2013-05-14 19:08:19 -07:00
Björn Steinbrink
bdc182cc41
Use static string with fail!() and remove fail!(fmt!())
...
fail!() used to require owned strings but can handle static strings
now. Also, it can pass its arguments to fmt!() on its own, no need for
the caller to call fmt!() itself.
2013-05-14 16:36:23 +02:00
Youngsoo Son
0c082047bc
Replace shared/unique by managed/owned in the tutorial
2013-05-14 22:25:55 +09:00
bors
3abc5b3ffb
auto merge of #6417 : pcwalton/rust/exprs-in-patterns, r=pcwalton
...
r? @graydon
2013-05-13 13:25:42 -07:00
Huon Wilson
d43908a3a7
doc: document the #[deriving] attribute.
...
Closes #4916 .
2013-05-13 20:04:03 +10:00
Patrick Walton
06ef889cdc
libsyntax: Remove extern mod foo { ... }
from the language.
2013-05-12 16:33:15 -07:00
bors
9ee8d506d9
auto merge of #6398 : osaut/rust/master, r=bstrie
...
I have replaced io::println by println in the tutorial as I do not think it is needed anymore since it is already included in prelude.rs.
2013-05-11 15:10:44 -07:00
Alex Crichton
60803e5fc8
Fix tests with the swap operator
2013-05-10 22:51:06 -04:00
Alex Crichton
63c7e2f991
Remove the '<->' operator from the language
2013-05-10 22:51:06 -04:00
Olivier Saut
017e7e8be1
Replace io::println by println as it is now included in prelude.rs
2013-05-10 21:12:11 +02:00
Daniel Micay
044abef0e5
fix incorrect region code based on the old 'self
...
also removes unnecessary casts from the RcMut implementation
2013-05-08 16:00:49 -04:00
Daniel Micay
8f2d71ac00
small fix to the tutorial-ffi destructor example
...
The previous example was erroneously attempting to destroy
uninitialized memory, which was often zeroed (masking the bug).
2013-05-04 21:57:10 -04:00
Daniel Micay
86efd97a10
add gitattributes and fix whitespace issues
2013-05-03 20:01:42 -04:00
Brendan Zabarauskas
ee26c7c433
Revert rename of Div to Quot
2013-05-01 15:40:05 +10:00
Jed Davis
4701716b56
Revert "doc: XFAIL mysterious failure on bots"
...
This reverts commit 2c6dae081b
.
2013-04-30 12:07:10 -07:00
Patrick Walton
2c6dae081b
doc: XFAIL mysterious failure on bots
2013-04-29 14:30:57 -07:00
Patrick Walton
670ab8ac36
librustc: Change labels to use the lifetime notation '
.
2013-04-29 14:30:57 -07:00
ILYONG CHO
9d33008da1
tutorial: Fix 'self' to 'Self'
2013-04-29 17:59:25 +09:00
Daniel Micay
46f91a0fa9
make way for a new iter module
2013-04-28 22:31:39 -04:00
Daniel Micay
195911fca4
tutorial-ffi: add example of a custom destructor
2013-04-26 14:07:57 -04:00