about summary refs log tree commit diff
path: root/src/doc
AgeCommit message (Collapse)AuthorLines
2019-06-04Update booksEric Huss-0/+0
2019-05-31Rollup merge of #61372 - mati865:books, r=Centril,GuillaumeGomezPietro Albini-22/+22
Migrate some books to mdbook version 0.2 There are 3 books still using old version but they need more effort so I hope to do them in subsequent PR if I find the time.
2019-05-30Migrate rustdoc book to MdBook2Mateusz Mikuła-6/+6
2019-05-30Migrate unstable-book to MdBook2Mateusz Mikuła-16/+16
2019-05-30Rollup merge of #61279 - llogiq:implicit-option-main-doctests, r=GuillaumeGomezMazdak Farrokhzad-0/+13
implicit `Option`-returning doctests This distinguishes `Option` and `Result`-returning doctests with implicit `main` method, where the former tests must end with `Some(())`. Open question: Does this need a feature gate? r? @GuillaumeGomez
2019-05-30Rollup merge of #60850 - SimonSapin:unguarded, r=alexcrichtonMazdak Farrokhzad-7/+0
Stabilize RefCell::try_borrow_unguarded Servo has been using this since https://github.com/servo/servo/pull/23196 to add a runtime check to some unsafe code, as discussed in PR https://github.com/rust-lang/rust/pull/59211. Stabilizing would help do more of the same in libraries that also have users on Stable.
2019-05-28implicit `Option`-returning doctestsAndre Bogus-0/+13
This distinguishes `Option` and `Result`-returning doctests with implicit `main` method, where the former tests must end with `Some(())`.
2019-05-28rustc-book: Update the rustc/clang compatibility table for xLTO.Michael Woerister-2/+3
2019-05-27Stabilize repr_align_enum in 1.37.0.Mazdak Farrokhzad-42/+0
2019-05-26docs: fix typo #61197airt-1/+1
2019-05-24Fixed type-alias-bounds lint docCerberuser-4/+7
The example code under type-alias-bounds lint produced two warnings - one from the lint itself and another from the dead_code lint, and only the second one was in the doc. This looked like an error, so I've added `#[allow(dead_code)]` and replaced the example output with the expected one. [Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&code=%23%5Ballow(dead_code)%5D%0Atype%20SendVec%3CT%3A%20Send%3E%20%3D%20Vec%3CT%3E%3B)
2019-05-17Auto merge of #49799 - hdhoang:46205_deny_incoherent_fundamental_impls, ↵bors-43/+2
r=nikomatsakis lint: convert incoherent_fundamental_impls into hard error *Summary for affected authors:* If your crate depends on one of the following crates, please upgrade to a newer version: - gtk-rs: upgrade to at least 0.4 - rusqlite: upgrade to at least 0.14 - nalgebra: upgrade to at least 0.15, or the last patch version of 0.14 - spade: upgrade or refresh the Cargo.lock file to use version 1.7 - imageproc: upgrade to at least 0.16 (newer versions no longer use nalgebra) implement #46205 r? @nikomatsakis
2019-05-17Rollup merge of #60791 - ehuss:update-books, r=Mark-SimulacrumManish Goregaokar-0/+0
Update books ## nomicon 1 commits in fb29b147be4d9a1f8e24aba753a7e1de537abf61..c656171b749b7307f21371dd0d3278efee5573b8 2019-04-22 19:10:29 -0400 to 2019-04-25 15:31:26 -0400 - Lifetimes: Updates to incorporate NLL (rust-lang-nursery/nomicon#101) ## reference 5 commits in 2a2de9ce095979978ad7b582daecf94e4070b916..862b669c395822bb0938781d74f860e5762ad4fb 2019-04-22 10:25:52 -0700 to 2019-05-04 23:41:35 -0700 - Typo (rust-lang-nursery/reference#606) - Added missing ? to Generics from InherentImpl and TraitImpl (rust-lang-nursery/reference#604) - Add missing ( to ExternalFunctionItem (rust-lang-nursery/reference#603) - Remove unneeded | from AssignmentExpression (rust-lang-nursery/reference#601) - Remove unneeded ( from TypePathSegment (rust-lang-nursery/reference#602) ## book 6 commits in db919bc6bb9071566e9c4f05053672133eaac33e..29fe982990e43b9367be0ff47abc82fb2123fd03 2019-04-15 20:11:03 -0400 to 2019-05-15 17:48:40 -0400 - Ignore a non-compiling test listing and add code to fix a test listing - Remove nostarch snapshots I've checked in layout - Reword error messages to maybe not need to wrap lines in print - This example doesn't compile but wasn't marked as such - Update install instructions for VS 2019 (rust-lang/book#1923) - Switch IRC to Discord ## rust-by-example 9 commits in 1ff0f8e018838a710ebc0cc1a7bf74ebe73ad9f1..811c697b232c611ed754d279ed20643a0c4096f6 2019-04-15 08:15:32 -0300 to 2019-04-28 18:56:42 -0300 - Fix typo in dsl.md (rust-lang/rust-by-example#1187) - File read lines (rust-lang/rust-by-example#1186) - For https://github.com/rust-lang/rust-by-example/issues/1184 closes rust-lang/rust-by-example#1184 (rust-lang/rust-by-example#1185) - Link to Reference for macro_rules designators (rust-lang/rust-by-example#1182) - Improve section Meta/Docs (rust-lang/rust-by-example#1183) - Small improvements to various files (rust-lang/rust-by-example#1173) - 19.2 Vectors Error in Code Example (rust-lang/rust-by-example#1178) - For https://github.com/rust-lang/rust-by-example/issues/1175 (rust-lang/rust-by-example#1176) - For https://github.com/rust-lang/rust-by-example/issues/1179 (rust-lang/rust-by-example#1180) ## rustc-guide 12 commits in 99e1b1d53656be08654df399fc200584aebb50e4..3cb727b62b953d59b4360d39aa68b6dc8f157655 2019-04-20 09:57:54 -0500 to 2019-05-07 09:53:32 -0500 - Fix typo, 'which' repeated twice - [canonicalization] fix result canonicalization example (rust-lang/rustc-guide#304) - Rename to RUSTC_LOG - Added mention of universal ctags - Fix link in walkthrough - Remove IRC from discussion chats - Bring the updating LLVM guide up to date - use nightly rust for ci - Fixed broken chalk links - Add documentation for two-phase borrows - Explain new powers of the `treat-err-as-bug` flag - Update lowering-module test case ## edition-guide 3 commits in c413d42a207bd082f801ec0137c31b71e4bfed4c..581c6cccfaf995394ea9dcac362dc8e731c18558 2019-04-22 01:14:56 +0200 to 2019-05-06 12:47:44 -0700 - Fix typo in controlling-panics-with-std-panic.md (rust-lang-nursery/edition-guide#158) - Fix links for book editions. (rust-lang-nursery/edition-guide#149) - Update now that NLL is enabled in 2015. (rust-lang-nursery/edition-guide#157) ## embedded-book 3 commits in de3d55f521e657863df45260ebbca1b10527f662..9858872bd1b7dbba5ec27dc30d34eba00acd7ef9 2019-04-22 12:58:28 +0000 to 2019-05-02 18:56:54 +0000 - Update linux.md (rust-embedded/book#167) - Clarify list of available targets for installation (rust-embedded/book#165) - minor grammar fix (rust-embedded/book#188)
2019-05-16Rollup merge of #60278 - ehuss:doc-html_root_url, r=GuillaumeGomezManish Goregaokar-0/+15
Document the `html_root_url` doc attribute value. I'm not sure if this was intentionally not documented, but I think it would be good to include. This was added in #9691. `--extern-html-root-url` is unstable, but I don't think it hurts to mention it.
2019-05-16Rollup merge of #60207 - felixrabe:patch-1, r=steveklabnikManish Goregaokar-10/+10
Outdent example, preserving nested fence
2019-05-15Update booksEric Huss-0/+0
2019-05-15Stabilize RefCell::try_borrow_unguardedSimon Sapin-7/+0
Servo has been using this since https://github.com/servo/servo/pull/23196 to add a runtime check to some unsafe code, as discussed in PR https://github.com/rust-lang/rust/pull/59211. Stabilizing would help do more of the same in libraries that also have users on Stable.
2019-05-12Update rustc book CLI docs.Eric Huss-11/+156
2019-04-25Document the `html_root_url` doc attribute value.Eric Huss-0/+15
2019-04-23Update cargo, booksEric Huss-0/+0
2019-04-23Outdent example, preserving nested fenceFelix Rabe-10/+10
2019-04-18Rename files in docYuki OKUSHI-11/+11
2019-04-16lint: convert incoherent_fundamental_impls into hard errorHoàng Đức Hiếu-43/+2
Also remove it from lint listings.
2019-04-14Rollup merge of #59930 - kornelski:first-robots, r=GuillaumeGomezMazdak Farrokhzad-0/+8
Exclude some copies of old book editions from search engines These are only stubs that confuse search engine users. There's no useful content in these locations.
2019-04-14Rollup merge of #59747 - gruberb:copy-book-toml-unstable-book, r=ehussMazdak Farrokhzad-0/+1
Copy book.toml unstable book generator Solves https://github.com/rust-lang/rust/issues/59554 and adds a book title to the unstable book. I assume that [copy_recursive](https://github.com/rust-lang/rust/blob/acd8dd6a50d505057a7d7ad8d0d7a4c2bd274200/src/tools/unstable-book-gen/src/main.rs#L105) will take files regardless of their type (`.md` or `.toml`). Although I had a hard time time testing it. A second pair of eyes is definitely needed.
2019-04-13Exclude some copies of old book editions from search enginesKornel-0/+8
2019-04-12Rollup merge of #59680 - DevQps:document-rustc-z-flag, r=cramertjMazdak Farrokhzad-0/+7
Document the -Z flag to the rustc book # Description Changes: - Added new documentation on the `-Z` flag of rustc in the command-line arguments section of the rustc book. If I need to rephrase anything or if you have any improvements, please let me know! I deliberately did not create an exhaustive list of all options since they are likely to change over time and per toolchain version. closes #41142
2019-04-11Auto merge of #59211 - nox:refcell-borrow-state, r=KodrAusbors-0/+7
Introduce RefCell::try_borrow_unguarded *Come sit next to the fireplace with me, this is going to be a long story.* So, you may already be aware that Servo has weird design constraints that forces us developers working on it to do weird things. The thing that interests us today is that we do layout on a separate thread with its own thread pool to do some things in parallel, whereas the data it uses comes from the script thread, which implements the entire DOM and related pieces, with `!Sync` data types such as `RefCell<T>`. The invariant we maintain is that script does not do anything ever with the DOM data as long as layout is doing its job. That's all nice and all, but one thing we don't ensure is that we don't actually know if script was currently mutably borrowing some `RefCell<T>` prior to starting layout, which may lead to aliasing mutable memory and obviously undefined behaviour. This PR reinstates `RefCell::borrow_state` so that [this method](https://github.com/servo/servo/blob/master/components/script/dom/bindings/cell.rs#L23-L30) can make use of it and return `None` if the cell was mutably borrowed. Cc @SimonSapin
2019-04-10Updated the description of -Z in the rustc book.Christian-4/+5
2019-04-07Change root path for unstable-bookBastian Gruber-0/+3
2019-04-06Update booksEric Huss-0/+0
2019-04-06Add book.toml to tools/unstable, add copy_book_toml to sciptBastian Gruber-2/+0
2019-04-05Add ignore to doc codeMasaki Hara-2/+2
2019-04-05Simplify fnbox docs.Masaki Hara-235/+15
2019-04-05Stabilize boxed_closure_impls in 1.35.0.Charles Lew-98/+0
2019-04-05Fix failing tests.Masaki Hara-1/+1
2019-04-05Add unstable-book articles on fnbox and boxed_closure_impls.Masaki Hara-0/+350
2019-04-04Rollup merge of #59685 - lzutao:patch-1, r=GuillaumeGomezMazdak Farrokhzad-1/+1
Add description for -Os and -Oz in rustc.1
2019-04-04Add description for -Os and -Oz in rustc.1lzutao-1/+1
2019-04-03Add documentation on the -Z flag on the command-line arguments section in ↵Christian-0/+6
the rustc book.
2019-04-03Updated the environment description in rustc.Christian-2/+2
2019-03-31update rustc-guide submodulemark-0/+0
2019-03-30Rollup merge of #59569 - gruberb:add-title-for-unstable-book, r=frewsxcvMazdak Farrokhzad-0/+2
Add book.toml with title to unstable-book doc Adding a title to the unstable book based on https://github.com/rust-lang/rust/issues/59554
2019-03-30Rollup merge of #59405 - benesch:docs-font, r=GuillaumeGomezMazdak Farrokhzad-3/+3
doc: use correct body font URLs The CSS for the docs homepage (docs.rust-lang.org) was using the wrong URL for the body font, resulting in the fallback serif font being used, instead of the desired Source Serif Pro fonts. (It's worth noting that the CSS for rustdoc's API generation got these URLs right.)
2019-03-30Add book.toml with title to unstable-book docBastian Gruber-0/+2
2019-03-30Rollup merge of #59376 - davidtwco:finally-rfc-2008-variants, ↵Mazdak Farrokhzad-5/+6
r=petrochenkov,QuietMisdreavus RFC 2008: Enum Variants Part of #44109. See [Zulip topic](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/rfc-2008/near/132663140) for previous discussion. r? @petrochenkov cc @nikomatsakis
2019-03-29Rollup merge of #59366 - ehuss:update-books, r=QuietMisdreavusMazdak Farrokhzad-3/+3
Update books Update reference, book, rust-by-example, edition-guide, embedded-book ## reference 15 commits in 41493ffce5d0e17d54eaf5ec9a995054e2b9aece..27ad493a10364e907ec476e2ad61e8a1614b57e1 2019-03-05 12:32:22 +0100 to 2019-03-26 02:06:15 +0100 - Document wasm_import_module for #[link]. (rust-lang-nursery/reference#554) - Fix tidy error. (rust-lang-nursery/reference#552) - Some minor contributing updates. (rust-lang-nursery/reference#551) - Document `type_length_limit`. (rust-lang-nursery/reference#546) - Add some terms to the glossary. (rust-lang-nursery/reference#547) - Document `target_feature` and `cfg_target_feature`. (rust-lang-nursery/reference#545) - Remove undocumented page (rust-lang-nursery/reference#539) - Reorg and update attributes (rust-lang-nursery/reference#537) - Fix some minor link errors. (rust-lang-nursery/reference#538) - Add linkchecker. (rust-lang-nursery/reference#521) - Expand docs on Macros By Example. (rust-lang-nursery/reference#511) - document #[panic_handler] (rust-lang-nursery/reference#362) - document #[used] (rust-lang-nursery/reference#361) - Note that UB is program-global (rust-lang-nursery/reference#490) - Fix copy-paste error in procedural-macros.md (rust-lang-nursery/reference#533) ## book 16 commits in 9cffbeabec3bcec42d09432bfe7705125c848889..b93ec30bbc7b1b5c2f44223249ab359bed2ed5a6 2019-03-02 08:22:41 -0500 to 2019-03-26 16:54:10 -0400 - Unignore example that now compiles - Fix code snippet (rust-lang/book#1863) - Fix mdbook link text in readme (rust-lang/book#1881) - Wrap to 80 cols - Make sentence more complete (rust-lang/book#1885) - consistenly use increment and decrement (rust-lang/book#1884) - Fix link to Reference's conditional-compilation. (rust-lang/book#1878) - Fix subject/verb agreement - Remove nostarch snapshot files that have been incorporated and checked - haha teach the dictionary steve's name - Add authorship info to the front page - fix accidental &lt;ol&gt;'s (rust-lang/book#1866) - Edits to Macros (rust-lang/book#1848) - Mention `lock` returns `MutexGuard` wrapped in a `LockResult` - Add an example that illustrates NLL (rust-lang/book#1842) - change the parameter name from `type` to `kind` (rust-lang/book#1845) ## rust-by-example 33 commits in 2ce92beabb912d417a7314d6da83ac9b50dc2afb..f68ef3d0f4959f6a7d92a08d9994b117f0f4d32d 2018-11-20 10:10:23 -0500 to 2019-03-12 15:32:12 -0300 - Fix some broken links. (rust-lang/rust-by-example#1161) - Update links in README (rust-lang/rust-by-example#1167) - Add score/lifetimes/trait.md (rust-lang/rust-by-example#1168) - Fix rust-lang/rust-by-example#1147 - No more `open_mode` method (rust-lang/rust-by-example#1164) - Fix for loop description in list print example (rust-lang/rust-by-example#1162) - Add link to Cargo chapter in the index page (rust-lang/rust-by-example#1159) - Fix grammar in sentence about integer notation (rust-lang/rust-by-example#1157) - Do not use deprecated functions from `std::error::Error` trait (rust-lang/rust-by-example#1151) - Update new_types.md to clarify conversion to base type (rust-lang/rust-by-example#1148) - Fix compatibility with Rust 2018 (rust-lang/rust-by-example#1150) - Hello: Fix hint link in `fmt` chapter. (rust-lang/rust-by-example#1146) - Clarify pub(restricted) example a bit (rust-lang/rust-by-example#1133) - Add "literal" to list of macro designators (rust-lang/rust-by-example#1153) - Minor fixes for the macros chapter (rust-lang/rust-by-example#1113) - Use new book links instead of the old second-edition ones (rust-lang/rust-by-example#1143) - Recommend implementing Display over ToString (rust-lang/rust-by-example#1145) - Remove unused import and format with `rustfmt` (rust-lang/rust-by-example#1144) - fix typo (rust-lang/rust-by-example#1142) - Update syntax for 2018 Edition (rust-lang/rust-by-example#1136) - Added two missing full stops (rust-lang/rust-by-example#1138) - Removed unnecessary spaces before macro designators in macros/dry (rust-lang/rust-by-example#1139) - fix install mdbook command (rust-lang/rust-by-example#1128) - Changed word `function` to `type` in comment of fn area (rust-lang/rust-by-example#1132) - Added two missing backticks in generics/multi_bounds (rust-lang/rust-by-example#1129) - Fixed small logic error in error/option_unwrap/and_then (rust-lang/rust-by-example#1127) - Fix typo (rust-lang/rust-by-example#1125) - The code of conduct link was dead. I fixed it. (rust-lang/rust-by-example#1122) - I added a space in the Display fmt for Complex (rust-lang/rust-by-example#1123) - Fix Rust install link in the index (rust-lang/rust-by-example#1124) - Update cargo conventions section (rust-lang/rust-by-example#1121) - Fixed curly braces in the `To and from Strings` chapter to be parentheses (rust-lang/rust-by-example#1120) - Edit a typo (rust-lang/rust-by-example#1119) - Fixes rust-lang/rust-by-example#1115 by correcting the typo from into_iterator to into_iter (rust-lang/rust-by-example#1118) ## edition-guide 1 commits in aa0022c875907886cae8f3ef8e9ebf6e2a5e728d..b56ddb11548450a6df4edd1ed571b2bc304eb9e6 2019-02-27 22:10:39 -0800 to 2019-03-10 10:23:16 +0100 - Links fixes (rust-lang-nursery/edition-guide#133) ## embedded-book 6 commits in 9e656ead82bfe869493dec82653a52e27fa6a05c..07fd3880ea0874d82b1d9ed30ad3427ec98b4e8a 2019-03-03 16:03:26 +0000 to 2019-03-27 15:40:52 +0000 - Fix test errors. (rust-embedded/book#180) - Update qemu.md (rust-embedded/book#170) - Update no-std.md to remove obsolete FAQ link (rust-embedded/book#177) - We've come a long way :) (rust-embedded/book#176) - Correct link to team (rust-embedded/book#175) - Update some book links to their new homes. (rust-embedded/book#173)
2019-03-29Update documentation.David Wood-5/+6
This commit updates the unstable book and diagnostics to reflect that the `#[non_exhaustive]` attribute is now available for enum variants.
2019-03-27Rollup merge of #59268 - estebank:from-string, r=QuietMisdreavusJosh Stone-0/+13
Add suggestion to use `&*var` when `&str: From<String>` is expected Fix #53879.
2019-03-27Update booksEric Huss-3/+3