about summary refs log tree commit diff
path: root/src/doc/rust.md
AgeCommit message (Collapse)AuthorLines
2014-05-10remove the word managed from the trait explanationAlan Andrade-1/+1
2014-05-10auto merge of #14068 : alexcrichton/rust/rustdoc-xcrate-links, r=brsonbors-3/+2
This should improve the libcore experience quite a bit when looking at the libstd documentation.
2014-05-09doc: Fix some broken linksAlex Crichton-3/+2
2014-05-09auto merge of #14043 : sanxiyn/rust/attr-reference, r=alexcrichtonbors-4/+4
Attribute grammar in reference manual allowed `#[foo, bar]`, which does not match parser behavior. Also rename nonterminals to match parser code. Fix #13825.
2014-05-08Handle breakage after libcore splitKevin Ballard-1/+1
API Changes: - &[T] and ~[T] no longer support the addition operator (+)
2014-05-08Handle fallout in documentationKevin Ballard-5/+5
Tweak the tutorial's section on vectors and strings, to slightly clarify the difference between fixed-size vectors, vectors, and slices.
2014-05-09Correct attribute grammar in reference manualSeo Sanghyeon-4/+4
2014-05-08auto merge of #13986 : alexcrichton/rust/box-keyword, r=thestingerbors-1/+1
This keyword is about to be used much more often than it was a few weeks ago, it's time to tell editors about the new keyword.
2014-05-07Test fixes and rebase conflictsAlex Crichton-1/+1
2014-05-07auto merge of #13958 : pcwalton/rust/detilde, r=pcwaltonbors-22/+24
for `~str`/`~[]`. Note that `~self` still remains, since I forgot to add support for `Box<self>` before the snapshot. r? @brson or @alexcrichton or whoever
2014-05-06librustc: Remove `~EXPR`, `~TYPE`, and `~PAT` from the language, exceptPatrick Walton-22/+24
for `~str`/`~[]`. Note that `~self` still remains, since I forgot to add support for `Box<self>` before the snapshot. How to update your code: * Instead of `~EXPR`, you should write `box EXPR`. * Instead of `~TYPE`, you should write `Box<Type>`. * Instead of `~PATTERN`, you should write `box PATTERN`. [breaking-change]
2014-05-06etc: Add box as a keyword to editor configsAlex Crichton-1/+1
This keyword is about to be used much more often than it was a few weeks ago, it's time to tell editors about the new keyword.
2014-05-03doc: Remove latex math documentationAlex Crichton-4/+4
This hasn't worked since pandoc stopped being used. We can get by well enough with the superscript extension for these equations. Closes #12989
2014-05-03rustdoc: Enable the footnote markdown extensionAlex Crichton-25/+44
This enables hoedown's footnote extension, and fixes all footnotes in the reference manual to use the new syntax.
2014-05-03rustdoc: Migrate from sundown to hoedownAlex Crichton-1/+1
This primary fix brought on by this upgrade is the proper matching of the ``` and ~~~ doc blocks. This also moves hoedown to a git submodule rather than a bundled repository. Additionally, hoedown is stricter about code blocks, so this ended up fixing a lot of invalid code blocks (ending with " ```" instead of "```", or ending with "~~~~" instead of "~~~"). Closes #12776
2014-05-01Fix a/an typosJorge Aparicio-3/+3
2014-04-27doc: perform some 80-chars wrappingsAdrien Tétar-1/+1
2014-04-21auto merge of #13587 : adrientetar/rust/more-docs, r=brsonbors-20/+14
- Use Fira Sans for headlines, Heuristica for the body (Adobe Utopia derivative). Both are licensed under the SIL OFL license. (I didn't include BoldItalic because it is sparingly used.) - Split TOC into 2 columns for the docs except manual (too tall, too wide to be readable). - Some fixes to rustdoc, bring styles in coherency with eachother - A few tweaks Two examples: [modified tutorial](http://adrientetar.legtux.org/cached/rust-docs/tutorial.htm) and [modified manual](http://adrientetar.legtux.org/cached/rust-docs/manual.htm). Rustdoc got some fixes, here is [modified `enum.FileType`](http://adrientetar.legtux.org/cached/rust-docs/enum.FileType.htm), [modified `std`](http://adrientetar.legtux.org/cached/rust-docs/std.htm) and [modified `std::io`](http://adrientetar.legtux.org/cached/rust-docs/io.htm). #13484, #13485 follow-up. cc @brson
2014-04-20auto merge of #13640 : jbcrail/rust/spelling-updates, r=alexcrichtonbors-3/+3
2014-04-20Fix spelling mistakes in documentation and code.Joseph Crail-3/+3
2014-04-20Allow inheritance between structs.Nick Cameron-0/+16
No subtyping, no interaction with traits. Partially addresses #9912.
2014-04-19doc: add webfonts and tweak the styles accordinglyAdrien Tétar-20/+14
2014-04-18Replace all ~"" with "".to_owned()Richo Healey-3/+3
2014-04-17doc: Removed all definition lists as Sundown doesn't support them.Kang Seonghoon-72/+72
Closes #13561. Please revert this commit when Sundown (or any replacement) gets a support for definition lists in the future.
2014-04-16auto merge of #13547 : alexcrichton/rust/remove-priv, r=huonwbors-2/+2
See [RFC 6](https://github.com/rust-lang/rfcs/blob/e0c741f1c6e372d0fd31c5978fcf8c7bd7c3e973/active/0006-remove-priv.md)
2014-04-16rustc: Remove private enum variantsAlex Crichton-2/+2
This removes the `priv` keyword from the language and removes private enum variants as a result. The remaining use cases of private enum variants were all updated to be a struct with one private field that is a private enum. RFC: 0006-remove-priv Closes #13535
2014-04-15Remove RUST_LOG="::help" from the docsTobias Bucher-4/+0
This feature is no longer present in the current version, it was removed along with the crate map.
2014-04-14Only check --crate-type flags if present.JustAPerson-2/+7
Before, normal compilation and the --crate-file-name flag would generate output based on both #![crate_type] attributes and --crate-type flags. Now, if one or more flag is specified by command line, only those will be used. Closes #11573.
2014-04-08Register new snapshotsAlex Crichton-1/+1
2014-04-08doc: Document flavorful variations of pathsAlex Crichton-1/+46
Closes #4293
2014-04-06auto merge of #13315 : alexcrichton/rust/libc, r=alexcrichton,mebors-1/+3
Rebasing of #12526 with a very obscure bug fixed on windows.
2014-04-06syntax: Tweak parsing lifetime bounds on closuresAlex Crichton-1/+38
In summary these are some example transitions this change makes: 'a || => ||: 'a proc:Send() => proc():Send The intended syntax for closures is to put the lifetime bound not at the front but rather in the list of bounds. Currently there is no official support in the AST for bounds that are not 'static, so this case is currently specially handled in the parser to desugar to what the AST is expecting. Additionally, this moves the bounds on procedures to the correct position, which is after the argument list. The current grammar for closures and procedures is: procedure := 'proc' [ '<' lifetime-list '>' ] '(' arg-list ')' [ ':' bound-list ] [ '->' type ] closure := [ 'unsafe' ] ['<' lifetime-list '>' ] '|' arg-list '|' [ ':' bound-list ] [ '->' type ] lifetime-list := lifetime | lifetime ',' lifetime-list arg-list := ident ':' type | ident ':' type ',' arg-list bound-list := bound | bound '+' bound-list bound := path | lifetime This does not currently handle the << ambiguity in `Option<<'a>||>`, I am deferring that to a later patch. Additionally, this removes the support for the obsolete syntaxes of ~fn and &fn. Closes #10553 Closes #10767 Closes #11209 Closes #11210 Closes #11211
2014-04-04Remove references to obsolete `do` keywordMatt Brubeck-4/+3
Also add the new `proc` keyword to the documentation.
2014-04-04Fix fallout from std::libc separationCorey Richardson-1/+3
2014-04-04manual: fix a broken exampleCorey Richardson-5/+5
2014-04-04manual: refine ECMA-335 reference for attributesCorey Richardson-6/+6
2014-04-04manual: further attribute clarificationsCorey Richardson-24/+29
- Sort attributes lexicographically - Use new attribute syntax consistently - Fix wording describing new attribute syntax - Expand section on `repr`
2014-04-04manual: fix attribute ebnfCorey Richardson-3/+3
2014-04-04manual: update styleCorey Richardson-6/+6
2014-04-04manual: many fixesCorey Richardson-82/+172
Mostly around attributes and language items.
2014-04-04manual: update the note about reserved attributesCorey Richardson-6/+5
2014-04-01auto merge of #13225 : thestinger/rust/num, r=cmrbors-3/+3
The `Float` trait methods will be usable as functions via UFCS, and we came to a consensus to remove duplicate functions like this a long time ago. It does still make sense to keep the duplicate functions when the trait methods are static, unless the decision to leave out the in-scope trait name resolution for static methods changes.
2014-03-31doc: Update with changes in field privacyAlex Crichton-9/+6
2014-03-31num: rm wrapping of `Float` methods as functionsDaniel Micay-3/+3
The `Float` trait methods will be usable as functions via UFCS, and we came to a consensus to remove duplicate functions like this a long time ago. It does still make sense to keep the duplicate functions when the trait methods are static, unless the decision to leave out the in-scope trait name resolution for static methods changes.
2014-03-28auto merge of #13168 : jankobler/rust/verify-grammar-02, r=brsonbors-15/+16
This fixes some problems with make verify-grammar llnextgen still reports a lot of errors FYI: My build directory /my-test/build is different from the source directory /my-test/rust. cd /my-test/build /my-test/rust/configure --prefix=/my-test/bin make make install make verify-grammar
2014-03-28Rename Pod into CopyFlavio Percoco-2/+2
Summary: So far, we've used the term POD "Plain Old Data" to refer to types that can be safely copied. However, this term is not consistent with the other built-in bounds that use verbs instead. This patch renames the Pod kind into Copy. RFC: 0003-opt-in-builtin-traits Test Plan: make check Reviewers: cmr Differential Revision: http://phabricator.octayn.net/D3
2014-03-27verify-grammar llnextgenJan Kobler-15/+15
When calling make verify-grammar a lot of errors are reported by llnextgen. Only simple errors like: missing semicolons, missing single quotes, usage of parentheses instead of squared brackets or usage of single quote instead of double quote are fixed by this patch. This can only be tested, when llnextgen is installed. Signed-off-by: Jan Kobler <eng1@koblersystems.de>
2014-03-27verify-grammar keyword crateJan Kobler-0/+1
When calling make verify-grammar or when llnextgen is not installed: python2.7 src/etc/extract_grammar.py <src/doc/rust.md an error is reported by extract_grammar.py that the keyword "crate" is not defined. This patch adds the keyword "crate" to the grammar in rust.md. Signed-off-by: Jan Kobler <eng1@koblersystems.de>
2014-03-24Correct overly broad definition of `'static` kind bound.Felix S. Klock II-2/+3
While double-checking my understanding of the meaning of `'static`, I made the following test program: ```rust fn foo<X:'static>(_x: X) { } #[cfg(not(acceptable))] fn bar() { let a = 3; let b = &a; foo(b); } #[cfg(acceptable)] fn bar() { static c : int = 4;; let d : &'static int = &c; foo(d); } fn main() { bar(); } ``` Transcript of compiling above program, illustrating that the `--cfg acceptable` variant of `bar` compiles successfully, showing that the `'static` kind bound only disallows non-`static` references, not *all* references: ``` % rustc --version /Users/fklock/opt/rust-dbg/bin/rustc 0.10-pre (caf17fe 2014-03-21 02:21:50 -0700) host: x86_64-apple-darwin % rustc /tmp/s.rs /tmp/s.rs:7:5: 7:8 error: instantiating a type parameter with an incompatible type `&int`, which does not fulfill `'static` /tmp/s.rs:7 foo(b); ^~~ error: aborting due to previous error % rustc --cfg acceptable /tmp/s.rs % ./s % ``` (Note that the explicit type annotation on `let d : &'static int` is necessary; it did not suffice for me to just write `let d = &'static c;`. That might be a latent bug, I am not sure yet.) Anyway, a fix to the documentation seemed prudent.
2014-03-22doc: Remove Freeze / NoFreeze from docsFlavio Percoco-5/+1