Bryan Dunsmore
08bc392d94
Update destructuring to reference tuples section.
2013-04-10 07:06:18 -05:00
bors
786ae0114b
auto merge of #5782 : zofrex/rust/doc-1-tuples, r=thestinger
...
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-08 16:22:03 -07:00
bors
c92936395c
auto merge of #5775 : pavpanchekha/rust/patch-1, r=thestinger
...
Change wrong field name in "Trait Inheritance" section.
2013-04-08 11:10:00 -07:00
Pavel Panchekha
c6d6782906
Fixed typo
...
Change wrong field name in "Trait Inheritance" section.
2013-04-07 23:19:31 -03:00
Bryan Dunsmore
f0d0cbfff8
Include definition of tuples for destructuring.
...
Updates the tutorial to include a simple definition for tuples in
section 4.2. Fixes #5132 .
2013-04-07 17:09:15 -05:00
zofrex
621d45b341
Update tutorial: 1-tuples now exist
2013-04-07 22:08:23 +01:00
bors
614d6da828
auto merge of #5721 : dhardy/rust/master, r=graydon
...
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-05 18:54:52 -07:00
Diggory Hardy
e2a6feb8fe
Tutorial: spelling correction and move a failing test to an xfail-test marked code block.
2013-04-05 12:26:47 +02:00
Diggory Hardy
1e483c7b70
Tutorial: fix typo
2013-04-04 22:35:23 +02:00
Diggory Hardy
964fc862e0
Tutorial: comment on how mutability applies to boxes
2013-04-04 18:13:12 +02:00
bors
717ed51f12
auto merge of #5716 : dhardy/rust/master, r=thestinger
2013-04-04 06:12:49 -07:00
Diggory Hardy
cb91e91418
Tutorial: rename variable to avoid confusion.
2013-04-04 15:08:25 +02:00
bors
1dc330c313
auto merge of #5707 : brettcannon/rust/patch-1, r=thestinger
...
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-04 01:21:50 -07:00
bors
aa899c97d9
auto merge of #5710 : ajuckel/rust/patch-1, r=luqmana
...
One word typo fix
2013-04-03 22:30:45 -07:00
Anthony Juckel
e2c7a4def2
Simple typo fix
2013-04-03 19:10:09 -05:00
Brett Cannon
8dd5a70ef4
Update tut. to not sound like I missed a section
...
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-03 18:52:28 -03:00
Daniel Micay
cc148b58ff
rename Linear{Map,Set} => Hash{Map,Set}
2013-04-03 10:30:36 -04:00
Daniel Micay
44029a5bbc
hashmap: rm linear namespace
2013-04-03 10:30:18 -04:00
Graydon Hoare
951f460aa8
tidy version numbers and copyright dates
2013-04-01 16:15:49 -07:00
Brian Anderson
243e601e51
doc: Update tutorial description of core
2013-04-01 14:30:14 -07:00
Luqman Aden
d617030d63
Update tutorial.md
...
Change fn() -> &fn().
2013-03-31 18:34:51 -07:00
Patrick Walton
1e91595520
librustc: Remove fail_unless!
2013-03-29 16:39:08 -07:00
Daniel Micay
0189ef3600
tutorial: add an example of freezing a managed box
2013-03-29 15:45:10 -04:00
Daniel Micay
f78af18127
tutorial: improve the managed boxes section
2013-03-29 15:45:10 -04:00
Daniel Micay
85ed840e23
tutorial: improve the owned boxes section
2013-03-29 15:45:07 -04:00
Daniel Micay
777ad8b204
tutorial: use "owned box" consistently
2013-03-29 14:16:52 -04:00
Daniel Micay
d4509f270b
tutorial: only Owned types can have a Drop impl
2013-03-28 18:41:55 -04:00
Daniel Micay
467502216e
tutorial: cleaner libc use statements
2013-03-28 17:53:29 -04:00
Patrick Walton
b07b36bbf3
test: Fix tests
2013-03-26 22:45:22 -07:00
Alex Crichton
31f6e64324
doc: Remove mentions of oldmap::HashMap
2013-03-26 19:20:02 -04:00
Graydon Hoare
b481829306
docs: update to avoid mention of const.
2013-03-25 15:53:02 -07:00
Patrick Walton
28efc234f4
libcore: Fix obsolete syntax in extfmt
2013-03-22 23:09:15 -07:00
Luca Bruno
f9bb7b7768
Tutorial: make struct section more coherent
...
In struct section of tutorial, make everything more coherent and
clear by always using "struct Point". Also, do not prematurely
introduce pointers and arrays. Fixes #5240
Signed-off-by: Luca Bruno <lucab@debian.org>
2013-03-21 21:33:29 +01:00
Daniel Micay
9967dc81fe
rewrite the tutorial section on boxes
2013-03-19 16:27:08 -04:00
Patrick Walton
8fa66e8e07
librustc: Remove implicit self from the language, except for old-style drop blocks.
2013-03-13 20:07:10 -07:00
Brian Anderson
82f190355b
Remove uses of log
2013-03-11 23:19:42 -07:00
Patrick Walton
08c840205e
librustc: Lint the old drop
destructor notation off
2013-03-11 09:36:00 -07:00
Patrick Walton
1fcb0443cf
doc: Remove documentation on newtype enums.
2013-03-11 09:35:59 -07:00
Patrick Walton
d7e74b5e91
librustc: Convert all uses of assert
over to fail_unless!
2013-03-07 22:37:57 -08:00
Niko Matsakis
3168fe06ff
Add manual &self/ and &static/ and /&self declarations that
...
are currently inferred. New rules are coming that will require
them to be explicit. All add some explicit self declarations.
2013-03-06 15:12:57 -05:00
Patrick Walton
30bb09c0e7
test: Remove fn@
, fn~
, and fn&
from the test suite. rs=defun
2013-03-02 18:47:47 -08:00
Patrick Walton
a3f728238b
librustc: Forbid chained imports and fix the logic for one-level renaming imports
2013-03-02 16:49:30 -08:00
Patrick Walton
2859c1ac6d
librustc: Enforce cross-crate method privacy
2013-02-28 11:32:26 -08:00
Patrick Walton
8d7e6ef772
libsyntax: Forbid ~mut
and ~const
. rs=demuting
2013-02-27 09:40:15 -08:00
Alex Crichton
df481473da
Fix unused imports in the tutorials
2013-02-26 17:52:16 -05:00
bors
0e6d895ed8
auto merge of #5119 : Kimundi/rust/incoming, r=catamorphism
...
Removed deprecated `str()` functions in int-template.rs and uint-template.rs
2013-02-26 10:54:39 -08:00
Patrick Walton
c9dd917fad
doc: Remove references to mut fields. rs=demuting
2013-02-26 10:02:36 -08:00
Marvin Löbel
42b0bacd76
Removed deprecated str()
functions in int-template.rs and uint-template.rs
2013-02-26 16:38:30 +01:00
Patrick Walton
c0defda499
librustc: Separate the rest of the trait bounds with +
and stop parsing space-separated ones. rs=plussing
2013-02-21 08:29:48 -08:00
Marvin Löbel
34c39bb1c4
Rewrited section about rust tool
2013-02-19 22:19:19 +01:00
Marvin Löbel
8ee2d58683
Give the rust tool an own section in the tutorial.
2013-02-19 20:57:23 +01:00
Marvin Löbel
f684a8a56b
Mention rust tool in the tutorial
2013-02-19 18:10:31 +01:00
Luqman Aden
178882c98f
tests/tutorials: Get rid of move
.
2013-02-15 02:49:55 -08:00
Chris Peterson
5a4695d407
update tutorial and manual to use new impl Trait for Type
syntax
2013-02-13 23:19:27 -08:00
Brian Anderson
e08a805b30
Merge remote-tracking branch 'bstrie/rimov' into incoming
...
Conflicts:
src/libsyntax/parse/parser.rs
src/test/bench/graph500-bfs.rs
src/test/bench/sudoku.rs
src/test/run-pass/borrowck-mut-vec-as-imm-slice.rs
src/test/run-pass/empty-mutable-vec.rs
src/test/run-pass/foreach-nested.rs
src/test/run-pass/swap-2.rs
2013-02-04 11:58:30 -08:00
Daniel Micay
319eeb1c79
rename map -> oldmap and mark it as deprecated
...
LinearMap is quite a bit faster, and is fully owned/sendable without
requiring copies. The older std::map also doesn't use explicit self and
relies on mutable fields.
2013-02-03 15:55:10 -05:00
Ben Striegel
743c1c37e8
RIMOV, round 11
...
Last bit of mut removal, manually cleaning up outliers
2013-01-30 23:19:40 -05:00
Patrick Walton
366812a5c3
librustc: Change self
as a type to Self
everywhere. r=brson
2013-01-30 19:52:45 -08:00
Felix S. Klock II
2dda6d6f5d
Formatting cleanup.
...
I had put a line break in to try to stress the binding of mycircle,
but generated document looks cleaner without newline.
2013-01-29 11:28:52 +01:00
Felix S. Klock II
88bec09e63
Fix two code examples in main rust tutorial.
...
1. The section on trait definitions of static methods should include
a trait with a static method in the generated document.
2. The section on trait inheritance had a expression that appears
nonsensical ("let mycircle = @mycircle") in the generated document.
The text would be clearer (IMO) if we continued with the running
example of CircleStruct.
2013-01-29 11:28:52 +01:00
Seo Sanghyeon
92e52bc95e
doc: Document pattern matching on vectors
2013-01-23 22:26:47 +09:00
Chris Peterson
0b6487cf2c
doc: Fix tutorial typo and remove unnecessary xfail-test
2013-01-20 22:56:45 -08:00
Patrick Walton
f0fa67d6bf
doc: Fold information from the memory model interlude in the tutorial elsewhere
2013-01-10 21:24:55 -08:00
John Clements
08275826ca
corrected imprecision in description of mutable fields
2013-01-10 20:48:49 -08:00
Brian Anderson
22ed202b61
tutorial: Remove memory model section
2013-01-10 15:22:22 -08:00
Patrick Walton
2db3abddcd
librustc: Make unqualified identifier searches terminate at the nearest module scope. r=tjc
2013-01-08 22:02:35 -08:00
Patrick Walton
44ab00ee37
Revert "librustc: Make unqualified identifier searches terminate at the nearest module scope. r=tjc"
...
This reverts commit a8d37af247
.
2013-01-08 19:29:16 -08:00
Patrick Walton
a8d37af247
librustc: Make unqualified identifier searches terminate at the nearest module scope. r=tjc
2013-01-08 19:27:57 -08:00
Brian Anderson
62c7ca64f0
Merge remote-tracking branch 'superoptimizer/master' into HEAD
...
Conflicts:
doc/tutorial.md
2013-01-04 17:31:12 -08:00
Mark Lacey
d94e9c0b04
Fix two minor issues in the tutorial.
...
Remove an extraneous 'then', and replace 'second' with 'first'.
2013-01-03 22:36:35 -08:00
Chris Peterson
16797fd525
doc: Fix some typos in the tutorial and reference manual
2012-12-31 13:46:52 -08:00
Andrew Paseltiner
4cb9247e3b
doc: make small corrections to tutorial
2012-12-30 16:09:34 -05:00
Patrick Walton
4be7310be0
doc: Fix explanation and example of struct-like enum variants. rs=busted
2012-12-30 07:09:14 -08:00
Patrick Walton
4b3dd4b920
doc: Fix some broken tutorial examples. rs=bustage
2012-12-29 21:52:51 -08:00
Tim Chevalier
09bb07bed9
Unfortunately, we can't embed cross-crate tests in the tutorial...
...
...as far as I know, anyway, so I xfailed this tutorial test.
2012-12-24 18:29:02 -08:00
Eric J. Holmes
8223a1278d
Fix example.
2012-12-24 18:29:02 -08:00
Graydon Hoare
329316ce15
bump 0.5 => 0.6, redirect some URLs in docs.
2012-12-24 18:29:01 -08:00
Tim Chevalier
3cc0fbca5d
doc: mention struct-like enum variants /cc #4217
2012-12-24 15:59:37 -08:00
Tim Chevalier
cf768ce1f4
Unfortunately, we can't embed cross-crate tests in the tutorial...
...
...as far as I know, anyway, so I xfailed this tutorial test.
2012-12-24 14:07:37 -08:00
Tim Chevalier
b1b0c297a4
Merge pull request #4249 from graydon/0.6-bump
...
bump 0.5 => 0.6, redirect some URLs in docs.
2012-12-23 13:47:11 -08:00
Eric J. Holmes
889e560ca5
Fix example.
2012-12-23 13:30:23 -08:00
Graydon Hoare
dbd36111fe
bump 0.5 => 0.6, redirect some URLs in docs.
2012-12-21 15:35:49 -08:00
Brian Anderson
45e62d0a14
tutorial: Discuss argument patterns
2012-12-20 16:51:37 -08:00
Brian Anderson
d098faa855
tutorial: Clarify description of trait inheritance
2012-12-20 16:36:13 -08:00
Brian Anderson
21c9d0858b
tutorial: Fix broken examples
2012-12-20 16:32:44 -08:00
Brian Anderson
f26df46a12
tutorial: Re-remove core:: prefix from some examples
2012-12-20 16:32:44 -08:00
Brian Anderson
d38f784da6
tutorial: Typo
2012-12-20 16:32:44 -08:00
Brian Anderson
b7354f114d
tutorial: Clean up language about syntax extensions
2012-12-20 16:32:43 -08:00
Brian Anderson
30fac74bf3
tutorial: Try to fit the early discussion of :: in better
2012-12-20 16:32:43 -08:00
Brian Anderson
cbddd5ed34
tutorial: Remove some trivia about operators
2012-12-20 16:32:43 -08:00
Brian Anderson
2f615dc965
tutorial: Editing
2012-12-20 16:32:43 -08:00
Brian Anderson
e4b3915393
tutorial: Fix example in syntax basics section
2012-12-20 16:32:43 -08:00
Brian Anderson
1983e540e6
tutorial: Update scope
2012-12-20 16:32:43 -08:00
Brian Anderson
072017e5ef
tutorial: Mention rusti with other tools
2012-12-20 16:32:43 -08:00
Brian Anderson
201039cf0d
tutorial: Discuss the primitive types along with their literals
2012-12-20 16:32:43 -08:00
Brian Anderson
107b2e5348
tutorial: It doesn't matter that Rust identifiers are the same as C
2012-12-20 16:32:43 -08:00
Brian Anderson
36e2c100bf
tutorial: Integrate constants into main intro text
2012-12-20 16:32:43 -08:00
Brian Anderson
e06ca65244
tutorial: Remove the section on constants
...
We can mention that constants are declared with 'const' in one line.
Don't need an entire section.
2012-12-20 16:32:42 -08:00
Brian Anderson
0b0b50aaae
tutorial: Remove the entire 'Types' section
...
It's not interesting
/cc: #4217
2012-12-20 16:32:42 -08:00
Brian Anderson
64681213af
tutorial: Remove mutable vector syntax
2012-12-20 16:32:42 -08:00