about summary refs log tree commit diff
path: root/src/doc/book
AgeCommit message (Collapse)AuthorLines
2016-07-21Rollup merge of #34880 - xitep:master, r=steveklabnikGuillaume Gomez-7/+7
Make .enumerate() example self-explanatory Should resolve #34624
2016-07-18Properly feature gate all unstable ABIsVadim Petrochenkov-0/+1
2016-07-17doc/book: fix tests for non-x86 architectures, such as aarch64Ximin Luo-0/+8
`rustdoc --test` gets confused when "main" exists for some architectures but not others.
2016-07-17Make .enumerate() example self-explanatoryNovotnik, Petr-7/+7
2016-07-16Rollup merge of #34838 - steveklabnik:gh33677, r=alexcrichtonGuillaume Gomez-25/+48
Fix up documentation around no_std 1. Fix the sections in the book to have the correct signatures. I've also marked them as `ignore`; there's no way to set the `no_std` feature for libc, so it pulls in the stdlib, so this wasn't even testing the actual thing it was testing. Better to just ignore. 2. Correcting libcore's docs for factual inaccuracy, and add a note about language items. Fixes #33677 r? @alexcrichton
2016-07-15Fix up documentation around no_stdSteve Klabnik-25/+48
1. Fix the sections in the book to have the correct signatures. I've also marked them as `ignore`; there's no way to set the `no_std` feature for libc, so it pulls in the stdlib, so this wasn't even testing the actual thing it was testing. Better to just ignore. 2. Correcting libcore's docs for factual inaccuracy, and add a note about language items. Fixes #33677
2016-07-13doc: ffi referenced rust-snappy can not compile吴冉波-2/+56
r? @steveklabnik The referenced code https://github.com/thestinger/rust-snappy can not work. Maybe it's the old rust version? I do not know. So I try to rewrite these test cases. If it is not what you originally meaning, just ignored it.
2016-07-13Auto merge of #34660 - jseyfried:fix_parse_stmt, r=nrcbors-2/+2
Fix bugs in macro-expanded statement parsing Fixes #34543. This is a [breaking-change]. For example, the following would break: ```rust macro_rules! m { () => { println!("") println!("") //^ Semicolons are now required on macro-expanded non-braced macro invocations //| in statement positions. let x = 0 //^ Semicolons are now required on macro-expanded `let` statements //| that are followed by more statements, so this would break. let y = 0 //< (this would still be allowed to reduce breakage in the wild) } fn main() { m!() } ``` r? @eddyb
2016-07-12Fix fallout.Jeffrey Seyfried-2/+2
2016-07-11Fixed some typosDavid-2/+2
2016-07-08Rollup merge of #34699 - phlogisticfugu:master, r=steveklabnikManish Goregaokar-6/+9
enhancewindows documentation in getting-started - minor pronoun fix We -> You - PATH troubleshooting - dir output is vertical (but did not include timestamps) - executables not in %PATH% require .\ r? @steveklabnik
2016-07-08Rollup merge of #34610 - wuranbo:patch-2, r=steveklabnikManish Goregaokar-2/+3
doc: make the conditional-compilation example work If not, the error `does not have these features: foo` confused. r? @steveklabnik
2016-07-07Auto merge of #34682 - CensoredUsername:clobber-docs, r=eddybbors-3/+3
Correct inline assembly clobber formatting. Fixes the formatting for inline assembly clobbers used in the book. As this causes llvm to silently ignore the clobber an error is also added to catch cases in which the wrong formatting was used. Additionally a test case is added to confirm that this error works. This fixes #34458 Note: this is only one out of a few possible ways to fix the issue depending on how the asm! macro formatting is wanted. Additionally, it'd be nicer to have some kind of test or feedback from llvm if the clobber constraints are valid, but I do not know enough about llvm to say if or how this is possible.
2016-07-07more windows documentation in getting-startedPhlogistic Fugu-6/+9
- minor pronoun fix We -> You - PATH troubleshooting - dir output is vertical (but did not include timestamps) - executables not in %PATH% require .\
2016-07-07doc:remove useless conditional compilation feature吴冉波-3/+0
2016-07-06Rollup merge of #34667 - KaivoAnastetiks:fix/crate-documentation, r=ManishearthSteve Klabnik-0/+11
Add a section about crate documentation. Fixes #34329 ?r @steveklabnik
2016-07-06Rollup merge of #34626 - sylvestre:master, r=ManishearthSteve Klabnik-3/+3
Fix typos
2016-07-06Rollup merge of #34625 - jaredmanning:patch-1, r=apasel422Steve Klabnik-1/+1
Fix spacing in for loop enumeration example Add a space between the comma and j in (i, j) to make it look nice. This addresses my recent issue #34624. 😀
2016-07-06Rollup merge of #34621 - KaivoAnastetiks:fix/#33924, r=steveklabnikSteve Klabnik-2/+2
Clarifies the meaning of the external mutability.
2016-07-06Rollup merge of #34615 - rdotdk:master, r=ManishearthSteve Klabnik-1/+1
update cargo doc link updated proper link of cargo doc that contains details about list of options available in semantic versioninig for the dependencies section in Cargo.toml
2016-07-06Rollup merge of #33250 - durka:patch-19, r=steveklabnikSteve Klabnik-23/+50
update documentation of tuple/unit structs I made the "tuple structs are useless" editorializing a bit weaker and moved it to the end. Feel free to overrule me on that. I also added an example of how to unpack a tuple struct with dot notation, because it came up on IRC. `braced_empty_structs` is stable now, so I updated the example for unit-like structs to use that syntax. Should we show both ways? cc @ubsan r? @steveklabnik or @GuillaumeGomez
2016-07-06Correct inline assembly clobber formatting.CensoredUsername-3/+3
Fixes the formatting for inline assembly clobbers used in the book. As this causes llvm to silently ignore the clobber an error is also added to catch cases in which the wrong formatting was used. Additionally a test case is added to confirm that this error works.
2016-07-06typo nothings -> nothing吴冉波-1/+1
2016-07-05Auto merge of #34294 - alexandermerritt:book-nuls, r=steveklabnikbors-7/+7
Correct use of 'nul' 'null' and capitalization in the book r? @steveklabnik
2016-07-05show both forms of empty struct declarationAlex Burka-1/+4
2016-07-05Add a section about crate documentation.Kaivo Anastetiks-0/+11
2016-07-05Replace it's by its.Kaivo Anastetiks-1/+1
2016-07-04Auto merge of #34602 - Xmasreturns:patch-4, r=steveklabnikbors-0/+6
Update glossary.md Added a brief description of Combinators
2016-07-03Auto merge of #34532 - jonmarkprice:master, r=steveklabnikbors-27/+33
Book: Small grammatical and stylistic edits to book I've been reading [the book](https://doc.rust-lang.org/book/) and noticed a few small grammatical and stylistic issues which I've rolled into this pull request. I'm not sure if I should do so many small, unrelated edits in a single pull request but it seems like a lot of overhead for each small edit. Maybe one commit per edit but one pull request per file/section? Feedback is very much appreciated as this is my first pull request ever! r? @steveklabnik rollup
2016-07-03Fix a few typos in the docSylvestre Ledru-3/+3
2016-07-03Fix spacing in for loop enumeration exampleJared Manning-1/+1
Add a space between the comma and j in (i, j) to make it look nice.
2016-07-02Clarifies the meaning of the external mutability.Kaivo Anastetiks-2/+2
2016-07-02update cargo doc linkHariharan R-1/+1
updated proper link of cargo doc that contains details about list of options available in semantic versioninig for the dependencies section in Cargo.toml
2016-07-02doc: make the conditional-compilation example work吴冉波-1/+5
If not, the error `does not have these features: foo` confused. r? @steveklabnik
2016-07-01Update glossary.mdJonathan L-0/+6
Added a brief description of Combinators
2016-06-29NULL not back-tickedAlexander Merritt-1/+1
2016-06-28used curly instead of straight quotesJonathan Price-1/+1
2016-06-28Merging my book edits recent commits.Jonathan Price-1/+1
2016-06-28took comment out of code blockJonathan Price-3/+5
no reason for a long comment in a code block when we could take it out, especially since it looks like it's using markdown (`struct`, `&` and `lvl`).
2016-06-28fixed typo: term should be termsJonathan Price-1/+1
two terms (input lifetime and output lifetime) so "term" needs to be plural.
2016-06-28Rollup merge of #34442 - tatsuya6502:doc-book-ownership, r=steveklabnikGuillaume Gomez-1/+3
[doc] Fix links in Ownership section of the book - Add a missing link definition for `[i32]`. - Like `[stack]` link is pointing to `...#the-stack`, append `#the-heap` to `[heap]` link.
2016-06-28Rollup merge of #34328 - wuranbo:patch-1, r=steveklabnikGuillaume Gomez-2/+2
Traits where syntax's extra usage example more clearly r? @steveklabnik
2016-06-28Rollup merge of #34080 - royalstream:royalstream-book-june4, r=steveklabnikGuillaume Gomez-10/+7
Syntax coloring and more compact diagram Two cosmetic improvements: - New content was added a few days ago to the **Closures** chapter but it was missing rust's syntax coloring. - Also, in the **Crates and Modules** chapter, a diagram was improved to be more symmetric and to take less space.
2016-06-27many small grammatical and stylistic changesJonathan Price-17/+21
grammatical: "Here's" should be "Here are", "rules" is plural. stylistic: "rules for" is more idiomatic than "rules about". grammatical: No verb in "One or the other"; changed to "It's one or the other". code: added implied `fn main() { ... }` because it is referenced in "note: previous borrow ends here" semantic: "But" seems like the wrong word here, there is now, contrast, only further explanation. "so", "thus" or "therefor" is clearer. grammatical: Another misuse of "Here's", should be "Here are" (or possibly "Here're"). grammatical: "use" should be capitalized. All other subheadings capitalize the first word.
2016-06-27"also ... as well" is redundantJonathan Price-2/+2
Also "to access" is cleaner than "for accessing"
2016-06-27"errors with" is idiomatic in EnglishJonathan Price-1/+1
2016-06-27fixed backquotes and awkward borrowing clauseJonathan Price-3/+3
2016-06-25Rollup merge of #34403 - jonathandturner:move_liberror, r=alexcrichtonJeffrey Seyfried-1/+1
This PR refactors the 'errors' part of libsyntax into its own crate (librustc_errors). This is the first part of a few refactorings to simplify error reporting and potentially support more output formats (like a standardized JSON output and possibly an --explain mode that can work with the user's code), though this PR stands on its own and doesn't assume further changes. As part of separating out the errors crate, I have also refactored the code position portion of codemap into its own crate (libsyntax_pos). While it's helpful to have the common code positions in a separate crate for the new errors crate, this may also enable further simplifications in the future.
2016-06-24[doc] Fix links in Ownership section of the bookTatsuya Kawano-1/+3
2016-06-23Move errors from libsyntax to its own crateJonathan Turner-1/+1