Commit graph

346 commits

Author SHA1 Message Date
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
Brian Anderson
9dc6938292 Merge remote-tracking branch 'nickdesaulniers/issue4524' into nocomm1 2013-02-01 11:18:58 -08:00
Nick Desaulniers
7868b6bf55 Remove fail keyword from lexer & parser and clean up remaining calls to
fail

Fix merge conflicts - Issue 4524
2013-02-01 00:15:42 -08:00
John Clements
53688addaa test cases, cleanup 2013-01-31 23:05:12 -08:00
Niko Matsakis
0682ad0eb9 Finalize moves-based-on-type implementation.
Changes:

- Refactor move mode computation
- Removes move mode arguments, unary move, capture clauses
  (though they still parse for backwards compatibility)
- Simplify how moves are handled in trans
- Fix a number of illegal copies that cropped up
- Workaround for bug involving def-ids in params
  (see details below)

Future work (I'll open bugs for these...):

- Improve error messages for moves that are due
  to bindings
- Add support for moving owned content like a.b.c
  to borrow check, test in trans (but I think it'll
  "just work")
- Proper fix for def-ids in params

Def ids in params:

Move captures into a map instead of recomputing.

This is a workaround for a larger bug having to do with the def-ids associated
with ty_params, which are not always properly preserved when inlining.  I am
not sure of my preferred fix for the larger bug yet.  This current fix removes
the only code in trans that I know of which relies on ty_param def-ids, but
feels fragile.
2013-01-31 12:09:00 -08:00
Ben Striegel
aa9c28ef47 Repair RIMOV damage to doc tests 2013-01-31 00:21:36 -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
John Clements
18f1dba510 doc typo 2013-01-25 11:58:33 -08:00
Youngsoo Son
4b2aa286d8 Make super a keyword 2013-01-24 16:07:04 +09:00
Seo Sanghyeon
c379d96c67 doc: Document mutable function arguments 2013-01-23 17:20:36 +09:00
Tim Chevalier
e856606c0d Merge pull request #4562 from lbonn/loglevel
doc: fix log level ids
2013-01-21 19:53:24 -08:00
Chris Peterson
49e466f1e1 doc: Fix manual's link attributes example code 2013-01-20 22:56:45 -08:00
Laurent Bonnans
c3c90d2e4c doc: fix log level ids 2013-01-21 15:49:46 +09:00
Chris Peterson
16797fd525 doc: Fix some typos in the tutorial and reference manual 2012-12-31 13:46:52 -08:00
Tim Chevalier
3cc0fbca5d doc: mention struct-like enum variants /cc #4217 2012-12-24 15:59:37 -08:00
Brian Anderson
8b98e5a296 doc: Mention argument bindings in manual 2012-12-20 17:01:38 -08:00
Brian Anderson
850050b7df doc: 'trait constraints' -> 'inheritance'. Expand
/cc: #4217
2012-12-20 16:32:41 -08:00
Graydon Hoare
66aadecfee doc: describe the Drop trait. cc: #4217 2012-12-20 16:26:11 -08:00
Tim Chevalier
8554d5e710 doc: Mention tuple structs
/cc: #4217
2012-12-19 21:52:03 -07:00
Tim Chevalier
b99a2542f3 docs: mention static methods
/cc #4217
2012-12-19 21:32:19 -07:00
Tim Chevalier
2d313fe501 Update docs to mention trait constraints; also fix failing doc tests
/cc #4217
2012-12-19 20:38:28 -07:00
Graydon Hoare
e0072e39a7 doc: structure expressions. cc: #4217 2012-12-19 17:24:19 -08:00
Graydon Hoare
46766974c7 doc: mention moved and copied types. cc: #4217 2012-12-19 16:55:34 -08:00
Graydon Hoare
6d4621d85f doc: a little more material on object types, part of #4217. 2012-12-18 14:37:18 -08:00
Brian Anderson
d4daa78aa3 Update docs for crate file changes 2012-12-15 19:55:25 -08:00
Brian Anderson
b0fc222fda Fix broken tests 2012-12-14 16:36:32 -08:00
Tim Chevalier
47faeb9228 [docs] Note that types and modules share the same namespace 2012-12-14 15:42:34 -08:00
Brian Anderson
55c9cf72e3 Merge pull request #4181 from andrew-d/andrew-doc-fix1
Fix example in docs
2012-12-13 17:28:23 -08:00
Andrew Dunham
08b1c841da Rename "to_str" to "make_string" in the docs
There's already a "to_str" impl for string, so it fails here.
2012-12-13 20:07:58 -05:00
Brian Anderson
fa4fbd51f6 Update docs for kind name changes 2012-12-13 15:52:50 -08:00
Tim Chevalier
0138d87f8f Document pub use foo::* in the reference manual
r=brson

Closes #3788
2012-12-12 16:38:36 -08:00
Patrick Walton
eba4dadc54 doc: Fix broken doc test. rs=bustage 2012-12-08 11:47:03 -08:00
Tim Chevalier
2c2398ca0d Xfail broken tests 2012-12-07 23:42:58 -08:00
Graydon Hoare
bbc04dbb24 doc: fix busted doctest, r=burningtree. 2012-12-07 14:40:56 -08:00
Tim Chevalier
b4501f4c64 Document pattern ranges a little more
Patches for further documentation of them welcome, but this
is good enough for now.

Closes #1107
2012-12-06 21:52:50 -08:00
Brian Anderson
946427b562 manual: Clarify that Drop types cannot be Copy 2012-11-30 11:23:22 -08:00
Paul Stansifer
a88f9ac732 Macros can now also be stmts and items. 2012-11-29 12:09:11 -08:00
Brian Anderson
8f22582e9f Fix breakage. Expand const examples in manual 2012-11-19 23:20:37 -08:00
Jesse Jones
ca332a68fa Added optional pub to use_decl EBNF. 2012-11-18 18:28:05 -08:00
Jesse Jones
76712476c2 Slightly better description of macro designators.
Closes #3378
2012-11-18 18:25:06 -08:00
Jesse Jones
a24da7e254 Discuss the types that may be used with const items.
Also removed vector example that doesn't compile. IMO closes #3341.
2012-11-18 17:05:24 -08:00
Jesse Jones
a1bf759783 Added brief discussion of static trait methods.
Closes #3339
2012-11-18 15:49:53 -08:00
Jesse Jones
57c203ef7f Documented copy, ref, move in patterns.
Closes #3337
2012-11-18 15:26:12 -08:00
Jesse Jones
e46de5381b Moved the matching structs example next to the prose talking about struct matching 2012-11-18 15:15:12 -08:00
Jesse Jones
67d421d62d Document [0, ..8] vector syntax.
Closes #3336
2012-11-18 11:36:09 -08:00
Jesse Jones
d106ef88e6 Improved attribute section, mostly by mentioning lint attributes.
Closes #2769
2012-11-18 09:23:09 -08:00
Tim Chevalier
12a4130749 Typo 2012-11-15 19:36:48 -08:00
Tim Chevalier
2ab614f356 Document labeled break and continue in the reference manual
r=brson
2012-10-26 15:00:55 -07:00
Tim Chevalier
0ef75a6965 Document how the compiler disambiguates variable patterns from variant patterns
r=brson
Closes #3851
2012-10-25 15:03:33 -07:00
Tim Chevalier
19dae8dae1 Remove remaining mentions of <- from docs 2012-10-23 12:13:09 -07:00
Tim Chevalier
804c608f01 Remove binary move from the docs 2012-10-23 12:10:03 -07:00
Brian Anderson
5fc4e51ab7 docs: Remove unfinished sentence in manual. Closes #3806 2012-10-22 13:12:16 -07:00
Tim Chevalier
45d1cd83ab Copyedit "Items and attributes" section in docs
Most notably, I removed the "foldl" example in the section on pure functions,
as IIRC this is no longer something you need an unsafe block for
(pure functions are as pure as their arguments). Feel free to add
an example where an unsafe block really is needed.
2012-10-12 12:02:08 -07:00
Tim Chevalier
91315c3c2f manual: Lightly copyedit the crates section 2012-10-11 20:09:41 -07:00
Tim Chevalier
bb4dd06307 manual: Lightly copyedit the macros section 2012-10-11 20:03:24 -07:00
Graydon Hoare
5bca5f7c54 manual: fix one more nit. 2012-10-11 19:39:21 -07:00
Graydon Hoare
588d97d80e manual: fix accidentally broken test. 2012-10-11 19:30:43 -07:00
Graydon Hoare
13ea16152d manual: remove as many ~[] literals as possible. 2012-10-11 19:25:09 -07:00
Graydon Hoare
d81d4f1f3c manual: remove as many ~"" literals as possible. 2012-10-11 19:22:53 -07:00
Graydon Hoare
0b1a401bb7 manual: fix bullet list. 2012-10-11 19:15:40 -07:00
Graydon Hoare
d471e24214 manual: remove description of references (modes) from memory-slots section. 2012-10-11 19:12:35 -07:00
Graydon Hoare
70909533f0 manual: rewrite the section on type kinds. 2012-10-11 19:07:38 -07:00
Graydon Hoare
9bbff50c14 manual: fix various examples. 2012-10-11 18:18:53 -07:00
Graydon Hoare
089e257769 manual: capitalize more examples properly. 2012-10-11 18:18:53 -07:00
Graydon Hoare
9ea5e6a3b2 manual: fix vec and str types to discuss definite / indefinite size. 2012-10-11 18:18:53 -07:00
Graydon Hoare
45dc69d887 manual: example fixup. 2012-10-11 18:18:53 -07:00
Graydon Hoare
196cc0265c manual: add 'item', remove statement that built-in types are keywords. 2012-10-11 18:18:53 -07:00
Graydon Hoare
a1c831be25 manual: avoid describing 'assert' as 'like check', note future removal. 2012-10-11 18:18:53 -07:00
Graydon Hoare
73d4417dc7 manual: remove 'analogy' between return and return. meaningless. 2012-10-11 18:18:53 -07:00
Graydon Hoare
544d36bc4d manual: fixes to match expression examples and explanation. 2012-10-11 18:18:53 -07:00
Graydon Hoare
533cce8050 manual: remove unusual production name in match-expr grammar. 2012-10-11 18:18:53 -07:00
Graydon Hoare
1d69b81eef manual: "to" -> ".." 2012-10-11 18:18:53 -07:00
Graydon Hoare
515f88f1c1 manual: rewrite for-expression section to reflect this year's definition. 2012-10-11 18:18:53 -07:00
Graydon Hoare
fd85a0000a manual: add section on do-expressions. 2012-10-11 18:18:53 -07:00
Graydon Hoare
1a885f6be1 manual: add section on lambda expressions. 2012-10-11 14:42:11 -07:00
Graydon Hoare
2bb141c1f9 manual: remove mention of do-while loops. 2012-10-11 14:20:40 -07:00
Graydon Hoare
04e6b09c58 manual: remove mention of >>>. 2012-10-11 14:19:48 -07:00
Graydon Hoare
44f8a8ec5a manual: remove 'trivial cast', it's an unused definition. 2012-10-11 14:18:52 -07:00
Graydon Hoare
1d47c0a830 manual: note overloading and traits for comparison ops. 2012-10-11 14:18:52 -07:00
Graydon Hoare
eff4a36b3e manual: mention overloading, traits on the arithmetic and bitwise operators. 2012-10-11 14:18:52 -07:00
Graydon Hoare
edf493f07b manual: fix exponents on number types. 2012-10-11 14:18:52 -07:00
Graydon Hoare
3a2e9e404a manual: s/unique/owned/, s/shared/managed/, fix rval/lval more. 2012-10-11 14:18:52 -07:00
Graydon Hoare
c87ff5e29e manual: remove box-specific language. 2012-10-11 13:13:58 -07:00
Graydon Hoare
382e85c14f manual: "with" -> ".." for FRU. 2012-10-11 13:12:29 -07:00
Graydon Hoare
2c34ffa26f manual: link to expressions in lval/rval section. 2012-10-11 13:11:21 -07:00
Graydon Hoare
c46706fffd manual: add borrow operator to symbolic unary operator list; mention copy and move. 2012-10-11 13:11:07 -07:00
Graydon Hoare
e257f390e1 manual: add section for unary move expressions. 2012-10-11 13:10:43 -07:00
Graydon Hoare
009cf535a4 manual: add section for path expressions. 2012-10-11 13:10:20 -07:00
Graydon Hoare
43fd84a607 Fix doctest. 2012-10-11 12:49:52 -07:00
Graydon Hoare
25d8ca153e manual: pluralize; decls can introduce multiple names. 2012-10-11 12:25:25 -07:00
Graydon Hoare
78f29f2b14 manual: remove vestigial mention of tasking from definition of statement (long story, been there since first public release). 2012-10-11 12:21:32 -07:00
Graydon Hoare
c2fd04f66a manual: s/Self type/Self types/. 2012-10-11 12:12:31 -07:00
Graydon Hoare
a8e1d83103 manual: remove all mention of constraints. 2012-10-11 12:10:01 -07:00
Graydon Hoare
c4237db60e manual: capitalize examples, remove mention of named impls, change RC -> managed, clarify language. 2012-10-11 12:07:02 -07:00
Graydon Hoare
06a17a7ce5 manual: disambiguate field expressions from method-call expressions. 2012-10-11 11:57:12 -07:00
Graydon Hoare
d81196ce96 manual: improve description of traits. 2012-10-11 11:47:46 -07:00
Graydon Hoare
9cba4af243 manual: describe structs, split out handling of recursion from enums, deprecate records. 2012-10-11 11:47:27 -07:00
Graydon Hoare
0673b49b05 manual: remove mention of tags, now very obsolete. 2012-10-11 10:43:18 -07:00
Graydon Hoare
dfd00ec8a8 manual: link to kinds, remove kind-list. 2012-10-11 10:42:46 -07:00
Graydon Hoare
bc68a88593 manual: improve description of unsafe functions. 2012-10-11 10:41:24 -07:00
Graydon Hoare
9e6df28277 manual: capitalize 'Copy'. 2012-10-11 10:38:07 -07:00
Graydon Hoare
a2cace473b manual: remove a mode. 2012-10-11 10:36:37 -07:00
Graydon Hoare
c9cee7c2af Reorder function sections. 2012-10-11 10:33:32 -07:00
Graydon Hoare
860573e3e0 Reword para on diverging functions. 2012-10-11 10:31:57 -07:00
Graydon Hoare
012bb7de5b Typo: an -> a. 2012-10-11 10:23:24 -07:00
Graydon Hoare
3d31a6b899 Remove several references to resources; add section for Constants. 2012-10-10 17:18:12 -07:00
Graydon Hoare
cad6733db5 Remove mention of res_item, add const_item. Reword a bit. 2012-10-10 17:18:12 -07:00
Graydon Hoare
ff37c65f5c Remove mention of argv. 2012-10-10 17:18:12 -07:00
Graydon Hoare
304a2455c0 Mention deprecation of crate files. 2012-10-10 17:18:12 -07:00
Graydon Hoare
c639f44adb Tidy up macro_rules grammar. 2012-10-10 17:18:12 -07:00
Graydon Hoare
58807b0500 Mention doc comments. 2012-10-10 17:18:12 -07:00
Graydon Hoare
19f1c3174f Remove mention of block-comment nesting. 2012-10-10 17:18:12 -07:00
Graydon Hoare
8f9bb5d203 Fix markings about future in manual, remove out-of-date marker. 2012-10-10 17:18:12 -07:00
Graydon Hoare
d81a7aba3c Minor fixes to the runtime and scheduling part of manual. 2012-10-10 17:18:12 -07:00
Graydon Hoare
056fc13e10 Mention other languages. 2012-10-10 17:18:12 -07:00
Graydon Hoare
f016fd43f8 Remove section on 'note' expressions, they won't exist. 2012-10-09 20:05:41 -07:00
Graydon Hoare
fe1165f561 Tighten up language surrounding declarations, assignments, inits, lvals. 2012-10-09 20:05:41 -07:00
Tim Chevalier
f96a2a2ca1 Remove by-mutable-ref mode from the compiler
and test cases. Closes #3513
2012-10-05 22:45:50 -07:00
Graydon Hoare
0dd4b42a00 Fix nits in logging section. 2012-10-05 19:06:25 -07:00
Graydon Hoare
2f50607d88 Reword memory-ownership section. 2012-10-05 19:06:25 -07:00
Graydon Hoare
df98cb8e88 Replace box types section with pointer types section. 2012-10-05 19:06:24 -07:00
Graydon Hoare
e513bc9875 Minor reformatting. 2012-10-05 19:06:23 -07:00
Graydon Hoare
5947141aef Add section on unsafe functions, reword explanation on unsafe-overriding-purity. 2012-10-05 19:06:22 -07:00
Graydon Hoare
cb4c747e9f Add section on lvals, rvals and temps. 2012-10-05 19:06:21 -07:00
Graydon Hoare
6c2c694725 Rewrite the communication-between-tasks section completely. 2012-10-05 19:06:20 -07:00
Graydon Hoare
46371e1076 Remove port/chan-specific lifecycle terminology. 2012-10-05 19:06:20 -07:00
Tim Chevalier
fe12da0864 De-mode comm::Chan 2012-10-04 16:48:57 -07:00
Brian Anderson
f7e90fca6e docs: Make external links in manual relative so they link to the correct versions 2012-09-28 17:32:01 -07:00
Brian Anderson
4e2899ba88 docs: Note that the manual is out of date 2012-09-28 16:36:11 -07:00
Brian Anderson
37ff152851 docs: Fix links to libs in manual 2012-09-28 16:23:08 -07:00
Niko Matsakis
67a8e7128a Demode vec::push (and convert to method) 2012-09-26 18:02:07 -07:00
Graydon Hoare
e4148932fc Remove para on named impls. 2012-09-26 16:30:41 -07:00
Graydon Hoare
bf82d689ce Remove more references to 'export', fix crate keyword list. 2012-09-26 16:30:40 -07:00
Graydon Hoare
d26e2a9ce6 Switch a use of unchecked to unsafe. 2012-09-26 16:30:38 -07:00
Graydon Hoare
fbf362809b Remove description of export, briefly describe pub use. 2012-09-26 16:30:36 -07:00
Graydon Hoare
385c4dfba0 Adjust keyword list in refman to reflect present. 2012-09-26 16:30:35 -07:00
Graydon Hoare
a2ba952ff4 Mention NFKC, reformat lines to reflect 'semantic clause' structure. 2012-09-26 16:30:33 -07:00
Graydon Hoare
dffe188991 Install new pub/priv/export rules as defaults, old rules accessible under #[legacy_exports]; 2012-09-21 18:11:43 -07:00
Niko Matsakis
6b670c306b correct grammar name for again_expr 2012-09-20 06:39:22 -07:00
Niko Matsakis
86c48f03d1 doc: s/again/loop 2012-09-20 05:58:29 -07:00
Niko Matsakis
0dd4fad3e3 doc: correct for-loop example 2012-09-20 05:58:29 -07:00
Brian Anderson
77480e8e44 xfail two tests from the manual 2012-09-18 19:33:36 -07:00
Brian Anderson
5e9d38ede0 Remove 'unchecked' from docs 2012-09-18 11:57:57 -07:00
Brian Anderson
150acd26b2 docs: Doc tests may use elipses 2012-09-18 11:41:06 -07:00
Graydon Hoare
ae86db0d93 Fix doc test glitch. 2012-09-18 11:16:19 -07:00
Brian Anderson
cb7a5395dd Convert std::map to camel case 2012-09-10 17:08:36 -07:00
Brian Anderson
3bd1f32cd9 Convert all kind bounds to camel case. Remove send, owned keywords. 2012-09-07 18:10:11 -07:00
Tim Chevalier
0ce88fe401 Update docs to not refer to the of clause in an impl
Closes #3375
2012-09-06 16:19:34 -07:00
Patrick Walton
10c533861b doc: "import" -> "use" 2012-09-05 12:39:16 -07:00
Brian Anderson
200959d7ce Remove 'with' 2012-09-04 15:47:04 -07:00