about summary refs log tree commit diff
path: root/src/doc
AgeCommit message (Collapse)AuthorLines
2017-02-21Unicode productionsCorey Farwell-1/+1
2017-02-21IntroductionCorey Farwell-3/+3
2017-02-21clean up some thingsSteve Klabnik-44/+381
I double checked that everything is here and in the correct order; this fixes things up
2017-02-21Start the port of the reference to mdBookSteve Klabnik-0/+4081
This only really moves the files, there's a lot more work coming in the next commits. Part of #39588.
2017-02-20Rollup merge of #39976 - steveklabnik:reenable-book-linkchecker, r=frewsxcvCorey Farwell-89/+89
Reenable linkchecker for books In some senses, this is a revert of https://github.com/rust-lang/rust/pull/39633/commits/cacb3bc9c741a7d41a1085af850cd3ff852307f5#diff-b64563d143f859565c8357a28ef81101R212; we disabled linkchecker for the book because the links were added by JavaScript. Now, that's fixed upstream, and so we can re-enable the checker. This also involves two other fixes: we have to check for `name`s as well as `id`s for links, and the linking algorithm of mdBook changed to the same as rustdoc's, so we change some links back. ~~~This isn't quite ready yet; it's [depending on a PR of mine to mdBook](https://github.com/azerupi/mdBook/pull/209). After that's released, this should be the last of these kinds of shenanigans~~~ ๐Ÿ˜„ This is good to go ๐Ÿ˜„
2017-02-20Auto merge of #39748 - Rufflewind:master, r=steveklabnikbors-6/+52
Rust Book: Generics: Resolving ambiguities - Add a small section to generics.md to explain how ambiguities in type inference can be resolved using the `::<>` syntax. - Add links from syntax-index.md and iterators.md. - Minor edits to iterators.md and structs.md.
2017-02-20Revert "Fix up links"Steve Klabnik-89/+89
This reverts commit 7f1d1c6d9a7be5e427bace30e740b16b25f25c92. The original commit was created because mdBook and rustdoc had different generation algorithms for header links; now with https://github.com/rust-lang/rust/pull/39966 , the algorithms are the same. So let's undo this change. ... when I came across this problem, I said "eh, this isn't fun, but it doesn't take that long." I probably should have just actually taken the time to fix upstream, given that they were amenable. Oh well!
2017-02-20Auto merge of #39923 - mattyw:patch-1, r=steveklabnikbors-1/+1
Variable Bindings possible nitpick Complete drive by nitpick I'm afraid
2017-02-20Auto merge of #39304 - jrmuizel:drop-flags, r=steveklabnikbors-14/+2
Remove obsolete documentation about drop-flags
2017-02-19Rust Book: Generics: Resolving ambiguitiesPhil Ruffwind-6/+52
- Add a small section to generics.md to explain how ambiguities in type inference can be resolved using the ::<> syntax. - Add links from syntax-index.md and iterators.md. - Minor edits to iterators.md and structs.md.
2017-02-19Fixed some small issuesJakob Demler-8/+11
2017-02-18Rollup merge of #39847 - CBenoit:patch-1, r=frewsxcvGuillaume Gomez-1/+1
Correct a typo in procedural macros chapter of the Book. A simple and short correction for procedural macros chapter of the Rust Programming Language Book.
2017-02-18Variable Bindings possible nitpickMatt Williams-1/+1
Complete drive by nitpick I'm afraid
2017-02-16Correct a typo in procedural macros chapter of the Book. (fixup โ†ตBenoรฎt CORTIER-1/+1
[c8292fcd6ad2a06d2529f5])
2017-02-16Auto merge of #39876 - frewsxcv:rollup, r=frewsxcvbors-9/+7
Rollup of 12 pull requests - Successful merges: #39775, #39793, #39804, #39834, #39836, #39839, #39840, #39843, #39844, #39846, #39857, #39861 - Failed merges:
2017-02-15Rollup merge of #39840 - DaseinPhaos:patch-2, r=frewsxcvCorey Farwell-1/+1
Update procedural-macros.md Fix typo
2017-02-15fixed whitespace issuesJakob Demler-1/+3
2017-02-15Improve backtrace formating while panicking.Yamakaky-1/+14
- `RUST_BACKTRACE=full` prints all the informations (old behaviour) - `RUST_BACKTRACE=(0|no)` disables the backtrace. - `RUST_BACKTRACE=<everything else>` (including `1`) shows a simplified backtrace, without the function addresses and with cleaned filenames and symbols. Also removes some unneded frames at the beginning and the end. Fixes #37783. PR is #38165.
2017-02-15book: binary prefixed are defined by IEC and not in SIMichal Nazarewicz-1/+1
Binary prefixes (such as Gi for โ€˜gibi-โ€™ in GiB) are defined by International Electrotechnical Commission (IEC) and not in the International System of Units (SI).
2017-02-15Remove obsolete documentation about drop-flagsJeff Muizelaar-14/+2
2017-02-15book: donโ€™t use GNU extensions in the example unnecessarilyMichal Nazarewicz-8/+6
The use of a GNU C extension for bloc expressions is immaterial to the actual problem with C macros that the section tries to show so donโ€™t use it and instead use a plain C way of writing the macro.
2017-02-15add bash to error-messagesJakob Demler-2/+2
2017-02-15Correct a typo in procedural macros chapter of the Book.Benoรฎt CORTIER-1/+1
2017-02-15custom attributes and error reporting docs for procedural macrosJakob Demler-1/+69
2017-02-15Update procedural-macros.mdLuxko-1/+1
Fix typo
2017-02-15Stabilize field init shorthandest31-3/+0
Closes #37340.
2017-02-13Fix up linksSteve Klabnik-89/+89
mdbook and rustdoc generate links differently, so we need to change all these links.
2017-02-13Port Nomicon to mdbookSteve Klabnik-106/+105
1. move everything under a src directory 2. add README.md to the SUMMARY.md
2017-02-13Port TRPL to mdbookSteve Klabnik-146/+146
1. move everything under a src directory 2. add README.md to the SUMMARY.md
2017-02-13Re-implement rustbook in terms of mdbookSteve Klabnik-0/+8
mdbook has a lot of optional dependencies that we don't want, so instead of using it directly, we re-build rustbook to use mdbook as a library. For convenience' sake, we keep the same CLI interface as mdbook; the only difference is that it only accepts build and test subcommands, rather than the full range.
2017-02-11Improve grammar on field init docsJake Goulding-8/+4
2017-02-10Updated installing nightly instructionsAaron Power-13/+13
2017-02-08Rollup merge of #37928 - chriskrycho:document-rfc-1623, r=steveklabnikCorey Farwell-9/+60
Document RFC 1623: static lifetime elision. This should be the last item required for stabilizing RFC 1623 (#35897).
2017-02-08Add more examples, get everything passing at last.Chris Krycho-6/+33
2017-02-07Rollup merge of #39620 - Gheoan:patch-1, r=steveklabnikCorey Farwell-1/+1
add missing comma
2017-02-07Rollup merge of #39593 - steveklabnik:bookshelf-landing-page, r=frewsxcvCorey Farwell-20/+32
Re-write the doc index page Clarify and reorganize. Add the section for the bookshelf. More to come here in the near future! Part of #39588
2017-02-07Rollup merge of #39459 - phungleson:fix-short-hand-struct-doc, r=steveklabnikCorey Farwell-0/+46
Fix short hand struct doc Don't want to discredit @hngiang effort on this issue. I just want to lend a hand to fix this issue #38830, it is a very nice feature and is seemingly completed. Fixes #39096 r? @steveklabnik
2017-02-07reference: clarify #[cfg] sectionAlex Burka-5/+13
2017-02-07review nitsSteve Klabnik-8/+8
2017-02-07add missing commaGheorghe Anghelescu-1/+1
2017-02-06Re-write the doc index pageSteve Klabnik-20/+32
Clarify and reorganize. Add the section for the bookshelf. More to come here in the near future! Part of #39588
2017-02-06Auto merge of #38436 - bluecereal:patch-1, r=frewsxcvbors-2/+4
Update if-let.md Calling if-let a combination of if and let is confusing, as some may be led to believe that it's a literal combination, instead of syntactic sugar added to the language as a convenience. What's there to stop someone from thinking if-let is just if and let together? I do think this article does a good job of implying what's really going on; however, I was only able to notice this after I had begun to understand if/while-let statements, courtesy of the Rust IRC chat. Basically, this article lacks the clarity and explicitness an inexperienced programmer like me needs in order to understand the contents fully. This is shown by my inability to understand the if-let concept from this page of the Book alone. I think convenience, sugar, and (if-let != if + let) should all be made mention of in a clear, explicit manner. I lack confidence in my understanding of this issue, so I wrote just enough to hopefully get my thoughts across.
2017-02-05Update if-let.mdbluecereal-2/+2
2017-02-05Auto merge of #38161 - durka:rustdoc-crate-attrs, r=alexcrichtonbors-4/+4
rustdoc: fix doctests with non-feature crate attrs Fixes #38129. The book says that any top-level crate attributes at the beginning of a doctest are moved outside the generated `fn main`, but it was only checking for `#![feature`, not `#![`. These attributes previously caused warnings but were then ignored, so in theory this could change the behavior of doctests in the wild.
2017-02-03Simplify wording & fix test src/docSon-5/+10
2017-02-03Auto merge of #39287 - wesleywiser:move_cell, r=aturonbors-5/+7
Extend Cell to work with non-Copy types I'm not sure that I did this right but all of the tests pass. I also had to move the `new()` function so that `Cell`s with non-`Copy` `T`s could be created. That wasn't in the RFC but I assume it needed to be done?
2017-02-02Rollup merge of #39196 - apasel422:nomicon, r=petrochenkovGuillaume Gomez-6/+24
Update nomicon to describe `#[may_dangle]` CC #34761 r? @pnkfelix
2017-02-02Rollup merge of #38823 - Freyskeyd:doc-missingInformationCfgTest, r=steveklabnikGuillaume Gomez-0/+4
Improve doc cfg(test) and tests directory Hi, I was facing a problem with my code organisation. I was using a tests directory and i defined some `#[cfg(test)]` in my `src/`. But i was not able to use it in my `tests` folder. ```bash . โ”œโ”€โ”€ Cargo.lock โ”œโ”€โ”€ Cargo.toml โ”œโ”€โ”€ src โ”‚ย ย  โ”œโ”€โ”€ lib.rs โ”‚ย ย  โ””โ”€โ”€ test.rs โ””โ”€โ”€ tests โ””โ”€โ”€ x.rs ``` > src/lib.rs ```rust pub mod test; fn tesst() { assert!(test::t()); } ``` > src/test.rs ```rust pub fn t() -> bool { true } ``` > test/x.rs ```rust extern crate testt; use testt::test; fn tesst() { assert!(test::t()); } ``` I was unable to compile using `cargo test`: ```bash error[E0432]: unresolved import `testt::test` --> tests/x.rs:3:5 | 3 | use testt::test; | ^^^^^^^^^^^ no `test` in `testt` ``` If i remove the `tests` directory everything works fine. To use an utils module in your `tests` directory, you need to create a module in the directory (like `tests/utils.rs`). My `tests/x.rs` look like this now: ```rust extern crate testt; mod utils; fn tesst() { assert!(utils::t()); } ``` And my tree: ```bash . โ”œโ”€โ”€ Cargo.lock โ”œโ”€โ”€ Cargo.toml โ”œโ”€โ”€ src โ”‚ย ย  โ””โ”€โ”€ lib.rs โ””โ”€โ”€ tests โ”œโ”€โ”€ utils.rs โ””โ”€โ”€ x.rs ``` I think that thing must be documented in the book. Ping: - @badboy : Because he's the one who showed me the path - @shahn : Because he helped me too to find the solution Signed-off-by: Freyskeyd <simon.paitrault@iadvize.com>
2017-02-02Wrap 80 columnsSon-4/+10
2017-02-02Add doc field init shorthandGiang Nguyen-0/+22