summary refs log tree commit diff
path: root/doc
AgeCommit message (Collapse)AuthorLines
2013-04-01auto merge of #5669 : graydon/rust/tweaks, r=thestingerbors-5/+5
Just some minor cleanup of version strings and copyrights.
2013-04-01tidy version numbers and copyright datesGraydon Hoare-5/+5
2013-04-01auto merge of #5662 : catamorphism/rust/docs, r=catamorphismbors-1/+99
r? @brson
2013-04-01docs: Xfail test, it's just for illustration anywayTim Chevalier-2/+2
2013-04-01doc: Update tutorial description of coreBrian Anderson-23/+59
2013-04-01docs: Document language items, as per #3342Tim Chevalier-1/+99
2013-03-31Update tutorial.mdLuqman Aden-2/+2
Change fn() -> &fn().
2013-03-29librustc: Remove `fail_unless!`Patrick Walton-16/+16
2013-03-29auto merge of #5624 : thestinger/rust/tutorial, r=pcwaltonbors-13/+73
2013-03-29tutorial: add an example of freezing a managed boxDaniel Micay-4/+15
2013-03-29tutorial: improve the managed boxes sectionDaniel Micay-0/+14
2013-03-29tutorial: improve the owned boxes sectionDaniel Micay-5/+40
2013-03-29tutorial: use "owned box" consistentlyDaniel Micay-4/+4
2013-03-29auto merge of #5583 : jbclements/rust/docfix-for-block-comment-grammar, ↵bors-4/+4
r=jbclements ... by adding Kleene '+' in two places, and changing a "non-slash" into "non_slash_or_star". Closes #1588
2013-03-29auto merge of #5570 : alexcrichton/rust/fix-unused-imports, r=sanxiynbors-3/+3
Before it wouldn't warn about unused imports in the list if something in the list was used. These commits fix that case, add a test, and remove all unused imports in lists of imports throughout the compiler.
2013-03-28Removing unused importsAlex Crichton-3/+3
2013-03-28tutorial: only Owned types can have a Drop implDaniel Micay-1/+3
2013-03-28tutorial: cleaner libc use statementsDaniel Micay-5/+2
2013-03-28added defn of non_slash_or_starJohn Clements-2/+2
2013-03-28fix another subtle bug in comment regexJohn Clements-2/+2
2013-03-27fixes stated grammar for block comments, by adding Kleene '+' in two places.John Clements-2/+2
Closes #1588
2013-03-26test: Fix testsPatrick Walton-8/+8
2013-03-26librustc: Modify all code to use new lifetime binder syntaxPatrick Walton-11/+11
2013-03-26doc: Remove mentions of oldmap::HashMapAlex Crichton-5/+5
2013-03-26auto merge of #5549 : brson/rust/rustdoc, r=brsonbors-0/+5
r?
2013-03-26rustdoc: Tweak list styleBrian Anderson-0/+5
2013-03-26Updated to reflect alpha-rename of constant/static items section.Felix S. Klock II-4/+2
2013-03-26Miscellaneous documentation additions.Felix S. Klock II-1/+33
Added notes explaining how [expr, ..expr] form is used, targeted at individuals like me who thought it was more general and handled dynamic repeat expressions. (I left a TODO for this section in a comment, but perhaps that is bad form for the manual...) Added example of `do` syntax with a function of arity > 1; yes, one should be able to derive this from the text above it, but it is still a useful detail to compare and contrast against the arity == 1 case. Added example of using for expression over a uint range, since someone who is most used to write `for(int i; i < lim; i++) { ... }` will likely want to know how to translate that form (regardless of whether it happens to be good style or not for their use-case). Added note about the semi-strange meaning of "fixed size" of vectors in the vector type section.
2013-03-25auto merge of #5507 : graydon/rust/fixups2, r=graydonbors-21/+22
Just some editing-to-reflect-reality on release notes and manual.
2013-03-25docs: update to avoid mention of const.Graydon Hoare-21/+22
2013-03-25auto merge of #5505 : catamorphism/rust/macro-tutorial, r=graydonbors-23/+27
r? @jbclements
2013-03-22libcore: Fix obsolete syntax in extfmtPatrick Walton-36/+30
2013-03-22Copyedit macro tutorialTim Chevalier-23/+27
2013-03-22docs: Copyedit my randomly assigned sections of the manualTim Chevalier-132/+143
2013-03-21Tutorial: make struct section more coherentLuca Bruno-9/+18
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-19rewrite the tutorial section on boxesDaniel Micay-130/+160
2013-03-18librustc: Make the compiler ignore purity.Patrick Walton-58/+21
For bootstrapping purposes, this commit does not remove all uses of the keyword "pure" -- doing so would cause the compiler to no longer bootstrap due to some syntax extensions ("deriving" in particular). Instead, it makes the compiler ignore "pure". Post-snapshot, we can remove "pure" from the language. There are quite a few (~100) borrow check errors that were essentially all the result of mutable fields or partial borrows of `@mut`. Per discussions with Niko I think we want to allow partial borrows of `@mut` but detect obvious footguns. We should also improve the error message when `@mut` is erroneously reborrowed.
2013-03-13test: Fix tests. rs=testsPatrick Walton-19/+19
2013-03-13librustc: Remove implicit self from the language, except for old-style drop ↵Patrick Walton-2/+2
blocks.
2013-03-13librustc: Don't accept `as Trait` anymore; fix all occurrences of it.Patrick Walton-1/+1
2013-03-11Remove uses of logBrian Anderson-65/+12
2013-03-11librustc: Lint the old `drop` destructor notation offPatrick Walton-15/+15
2013-03-11doc: Remove documentation on newtype enums.Patrick Walton-44/+36
2013-03-07librustc: Convert all uses of `assert` over to `fail_unless!`Patrick Walton-31/+20
2013-03-06Add manual &self/ and &static/ and /&self declarations thatNiko Matsakis-12/+13
are currently inferred. New rules are coming that will require them to be explicit. All add some explicit self declarations.
2013-03-02test: Remove `fn@`, `fn~`, and `fn&` from the test suite. rs=defunPatrick Walton-3/+2
2013-03-02librustc: Forbid chained imports and fix the logic for one-level renaming ↵Patrick Walton-44/+43
imports
2013-03-02auto merge of #5137 : yjh0502/rust/empty_struct, r=nikomatsakisbors-100/+20
The fix is straight-forward, but there are several changes while fixing the issue. 1) disallow `mut` keyword when making a new struct In code base, there are following code, ```rust struct Foo { mut a: int }; let a = Foo { mut a: 1 }; ``` This is because of structural record, which is deprecated corrently (see issue #3089) In structural record, `mut` keyword should be allowd to control mutability. But without structural record, we don't need to allow `mut` keyword while constructing struct. 2) disallow structural records in parser level This is related to 1). With structural records, there is an ambiguity between empty block and empty struct To solve the problem, I change parser to stop parsing structural records. I think this is not a problem, because structural records are not compiled already. Misc. issues There is an ambiguity between empty struct vs. empty match stmt. with following code, ```rust match x{} {} ``` Two interpretation is possible, which is listed blow ```rust match (x{}) {} // matching with newly-constructed empty struct (match x{}) {} // matching with empty enum(or struct) x // and then empty block ``` It seems that there is no such code in rust code base, but there is one test which uses empty match statement: https://github.com/mozilla/rust/blob/incoming/src/test/run-pass/issue-3037.rs All other cases could be distinguished with look-ahead, but this can't be. One possible solution is wrapping with parentheses when matching with an uninhabited type. ```rust enum what { } fn match_with_empty(x: what) -> ~str { match (x) { //use parentheses to remove the ambiguity } } ```
2013-03-02auto merge of #5188 : ben0x539/rust/doc-call-generic-fn, r=catamorphismbors-1/+8
I have seen a few people confused on how to explicitly instantiate generic functions, since the syntax differs from C++'s and C#'s, which is probably where most people asking questions about generic functions are coming from. The only use of the `::<T>` syntax in the reference right now is in the section on paths, which is possibly not where someone trying to find out about generic functions is going to start looking. The tutorial doesn't mention it at all, but I think it's all right to make the reference a tiny bit more redundant and avoid stuffing the tutorial with syntax details. ---- The "Generic functions" subsection mentions that generic functions are instantiated based on context, so let's also mention right away (with a link to the #paths section) that an explicit form is available. This also adds an example that explicitly instantiates a generic function to the function call expression section.
2013-03-02Remove REC, change related tests/docsJihyun Yu-100/+20