summary refs log tree commit diff
path: root/src/doc/book
AgeCommit message (Collapse)AuthorLines
2016-08-14Rollup merge of #35647 - ahmedcharles:spelling, r=alexcrichtonEduard-Mihai Burtescu-1/+1
Ensure that attributes are spelled properly.
2016-08-13Ensure that attributes are spelled properly.Ahmed Charles-1/+1
2016-08-12book: fix the hidden find() functions in error-handling.mdChristophe Vu-Brugier-3/+3
The hidden find() functions always returns None. Consequently, one of the examples using find() prints "No file extension found" instead of "File extension: rs" which is the expected output. This patch fixes the issue by implementing find() with std::str::find(). Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
2016-08-08Rollup merge of #35466 - xitep:master, r=steveklabnikJonathan Turner-0/+1
book: fix formatting of module layout example
2016-08-08book: update example patterns to be more clearDoug Goldstein-6/+6
When using Point { x: 0, y: 0 } and showing pattern matching decomposing x and y individually its hard to understand. By using a different value for x and a different value for y it is more clear.
2016-08-07Fix formatting of module layout exampleNovotnik, Petr-0/+1
2016-08-05Rollup merge of #35189 - mLuby:patch-1, r=steveklabnikGuillaume Gomez-0/+2
Update the-stack-and-the-heap.md Was surprised to learn that heaps were used in this way, then realized upon reading [the linked paper](http://www.cs.cmu.edu/afs/cs/academic/class/15213-f98/doc/dsa.pdf) that it's a totally different type of heap—an important distinction.
2016-08-05Rollup merge of #35137 - jongiddy:explicit-wildcard, r=steveklabnikGuillaume Gomez-1/+1
Provide more explicit example of wildcard version in guessing game doc. Beginners may try to adapt the tutorial to develop their own code. When using different dependencies, they may use the wildcard for versioning. Since they are new to the language, they will not know that the wildcard asterisk is a string, not a token. Make the correct format more explicit, to remove one potential source of frustration.
2016-08-02Update the-stack-and-the-heap.mdmLuby-0/+2
Was surprised to learn that heaps were used in this way, then realized upon reading [the linked paper](http://www.cs.cmu.edu/afs/cs/academic/class/15213-f98/doc/dsa.pdf) that it's a totally different type of heap—an important distinction.
2016-08-02Ignore the lang-items example in the book.Eduard Burtescu-1/+1
2016-07-31Provide more explicit example of wildcard version in guessing game doc.Jonathan Giddy-1/+1
Beginners may try to adapt the tutorial to develop their own code. When using different dependencies, they may use the wildcard for versioning. Since they are new to the language, they will not know that the wildcard asterisk is a string, not a token. Make the correct format more explicit, to remove one potential source of frustration.
2016-07-30Auto merge of #34904 - petrochenkov:rustcall, r=nikomatsakisbors-0/+1
Properly feature gate all unstable ABIs Fixes https://github.com/rust-lang/rust/issues/34900 [breaking-change] r? @pnkfelix --- Function-visiting machinery for AST/HIR is surprisingly error-prone, it's *very* easy to miss some cases or visit something twice while writing a visitor. This is the true problem behind https://github.com/rust-lang/rust/issues/34900. I'll try to restructure these visitors a bit and send one more PR later.
2016-07-29Rollup merge of #35103 - brettcannon:patch-1, r=ManishearthGuillaume Gomez-3/+3
Try to clear up some awkward wording
2016-07-28Try to clear up some awkward wordingBrett Cannon-3/+3
2016-07-27remove claim about searching through nested fields for the nullable type, ↵Alex Burka-7/+9
even though that is how it works
2016-07-27fix typoAlex Burka-1/+1
2016-07-27revert libc changesAlex Burka-9/+13
2016-07-27hack to make example compileAlex Burka-1/+5
2016-07-27change confusing wording about discriminantAlex Burka-3/+3
2016-07-27extern fns require named parametersAlex Burka-1/+1
Not sure the example is going to stay, but I can try to pass Travis for the bragging rights.
2016-07-27foreign function interface interfaceAlex Burka-1/+1
2016-07-27not just a single fieldAlex Burka-1/+1
2016-07-27recursionAlex Burka-4/+4
2016-07-27expand nullable pointer exampleAlex Burka-4/+24
2016-07-27generics-agnostic descriptionAlex Burka-8/+6
2016-07-27book/ffi: nullable pointer, libc cleanupsAlex Burka-21/+46
Expand the "nullable pointer optimization" section with a code example. Change examples to use std::os::raw instead of libc, when applicable.
2016-07-26Rollup merge of #35043 - rahiel:patch-1, r=nikomatsakisSteve Klabnik-2/+0
doc/book/trait-objects: remove empty lines at start of examples I think it looks better without them.
2016-07-26doc/book/trait-objects: remove empty lines at start of examplesRahiel Kasim-2/+0
2016-07-23Update underscore usage (#34903)abhi-1/+2
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