about summary refs log tree commit diff
path: root/src/doc
AgeCommit message (Collapse)AuthorLines
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-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 <ol>'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
2019-03-26Rollup merge of #59197 - kornelski:redir, r=steveklabnikGuillaume Gomez-0/+2
Exclude old book redirect stubs from search engines Adds `<meta name="robots" content="noindex,follow">` to the `<head>` of old stub pages pointing to the second edition of the book. This is continuation of https://github.com/rust-lang/book/pull/1788
2019-03-24doc: use correct body font URLsNikhil Benesch-3/+3
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.
2019-03-22extend on-unimplemented docsEsteban Küber-2/+3
2019-03-22Add suggestion to use `&*var` when `&str: From<String>` is expectedEsteban Küber-0/+12
2019-03-15Track changes to robots.txtKornel-0/+19
2019-03-14Exclude old book redirect stubs from search enginesKornel-0/+2
2019-03-09Rollup merge of #58626 - QuietMisdreavus:doc-coverage, r=GuillaumeGomezMazdak Farrokhzad-4/+31
rustdoc: add option to calculate "documentation coverage" This PR adds a new flag to rustdoc, `--show-coverage`. When passed, this flag will make rustdoc count the number of items in a crate with documentation instead of generating docs. This count will be output as a table of each file in the crate, like this (when run on my crate `egg-mode`): ``` +-------------------------------------+------------+------------+------------+ | File | Documented | Total | Percentage | +-------------------------------------+------------+------------+------------+ | src/auth.rs | 16 | 16 | 100.0% | | src/common/mod.rs | 1 | 1 | 100.0% | | src/common/response.rs | 9 | 9 | 100.0% | | src/cursor.rs | 24 | 24 | 100.0% | | src/direct/fun.rs | 6 | 6 | 100.0% | | src/direct/mod.rs | 41 | 41 | 100.0% | | src/entities.rs | 50 | 50 | 100.0% | | src/error.rs | 27 | 27 | 100.0% | | src/lib.rs | 1 | 1 | 100.0% | | src/list/fun.rs | 19 | 19 | 100.0% | | src/list/mod.rs | 22 | 22 | 100.0% | | src/media/mod.rs | 27 | 27 | 100.0% | | src/place/fun.rs | 8 | 8 | 100.0% | | src/place/mod.rs | 35 | 35 | 100.0% | | src/search.rs | 26 | 26 | 100.0% | | src/service.rs | 74 | 74 | 100.0% | | src/stream/mod.rs | 49 | 49 | 100.0% | | src/tweet/fun.rs | 15 | 15 | 100.0% | | src/tweet/mod.rs | 73 | 73 | 100.0% | | src/user/fun.rs | 24 | 24 | 100.0% | | src/user/mod.rs | 87 | 87 | 100.0% | +-------------------------------------+------------+------------+------------+ | Total | 634 | 634 | 100.0% | +-------------------------------------+------------+------------+------------+ ``` Trait implementations are not counted because by default they "inherit" the docs from the trait, even though an impl can override those docs. Similarly, inherent impl blocks are not counted at all, because for the majority of cases such docs are not useful. (The usual pattern for inherent impl blocks is to throw all the methods on a type into a single impl block. Any docs you would put on that block would be better served on the type itself.) In addition, `--show-coverage` can be combined with `--document-private-items` to get the coverage counts for everything in the crate, not just public items. The coverage calculation is implemented as a late pass and two new sets of passes which strip out most of the work that rustdoc otherwise does when generating docs. The is because after the new pass is executed, rustdoc immediately closes instead of going on to generate documentation. Many examples of coverage calculations have been included as `rustdoc-ui` tests. r? @rust-lang/rustdoc
2019-03-08Update booksEric Huss-0/+0
2019-03-01Auto merge of #58800 - ehuss:update-books, r=Centrilbors-0/+0
Update edition-guide 15 commits in 419edb885ec1a98c0747b3907003d79e3e6b93a9..5f3cc2a5618700efcde3bc00799744f21fa9ad2e 2018-12-04 16:43:38 -0500 to 2019-02-27 20:11:50 -0800 - Migrate to mdbook 0.2. (rust-lang-nursery/edition-guide#152) - Remove automatic deployment. (rust-lang-nursery/edition-guide#151) - Fix issue with rust's linkchecker and mdbook. (rust-lang-nursery/edition-guide#147) - Fix test now that overflowing_literals is rejected in all editions. (rust-lang-nursery/edition-guide#148) - overflowing_literals is deny on all editions (rust-lang-nursery/edition-guide#146) - Update for uniform_path stabilization. (rust-lang-nursery/edition-guide#141) - Add example to rustup to show overriding to specific version (rust-lang-nursery/edition-guide#144) - Update for anonymous-lifetime stabilization. (rust-lang-nursery/edition-guide#142) - Add minimum Rust version for Kleene operator (rust-lang-nursery/edition-guide#137) - Add 2018-specific changes. (rust-lang-nursery/edition-guide#130) - aborting-on-panic.md: Typo in example config (rust-lang-nursery/edition-guide#125) - Clarify uniform paths are not yet in Rust 2018 (rust-lang-nursery/edition-guide#124) - update several version numbers - Fixes outdated link (rust-lang-nursery/edition-guide#131) - Fixed typo in transitioning page. (rust-lang-nursery/edition-guide#127)
2019-02-28tweak docs for rustdoc's `--show-coverage`QuietMisdreavus-4/+8
2019-02-28update docs for doc coverageQuietMisdreavus-2/+4
2019-02-28tabs -> spacesQuietMisdreavus-4/+4
2019-02-28add option to calculate documentation coverageQuietMisdreavus-0/+21
2019-02-27Update edition-guideEric Huss-0/+0
2019-02-27Add c_variadic to the unstable-bookDan Robertson-0/+50
- Add the c_variadic language feature - Add the c_variadic library feature
2019-02-27Auto merge of #58709 - kornelski:book, r=QuietMisdreavusbors-0/+0
Update book submodule Updates the book to the latest commit This is to include [documentation SEO fix](https://github.com/rust-lang/book/pull/1788) ASAP.
2019-02-25Update book submoduleKornel-0/+0
2019-02-25Rollup merge of #55632 - ollie27:deny_overflowing_literals, r=CentrilMazdak Farrokhzad-20/+20
Deny the `overflowing_literals` lint for all editions The `overflowing_literals` was made deny by default for the 2018 edition by #54507, however I'm not aware of any reason it can't be made deny by default for the 2015 edition as well.
2019-02-20fix typoAndre Bogus-1/+1
2019-02-20Rollup merge of #58544 - TheBiggerGuy:rustc-doc-cli-args, r=TimNNkennytm-2/+2
Fix doc for rustc "-g" flag The rustc `-g` CLI flag was miss documented to be a synonym of `-C debug-level=2` and not `-C debuglevel=2`. Also add links to the codegen docs for each synonym. I am unsure of this will conflict with work on #52938
2019-02-20Rollup merge of #58534 - dwijnand:mention-capping-forbid-lints, r=oli-obkkennytm-1/+3
Mention capping forbid lints I felt the description of forbid was misleading/incomplete without mentioning how --cap-lints interacts with it.
2019-02-20Rollup merge of #56470 - llogiq:process-termination-doctest, r=GuillaumeGomezkennytm-0/+17
Modify doctest's auto-`fn main()` to allow `Result`s This lets the default `fn main()` ~~return `impl Termination`~~ unwrap Results, which allows the use of `?` in most tests without adding it manually. This fixes #56260 ~~Blocked on `std::process::Termination` stabilization.~~ Using `Termination` would have been cleaner, but this should work OK.
2019-02-17Add links to codegen docs for rustc synonym flagsGuy Taylor-2/+2
The rustc "-g" and "-o" fags are synonyms of the "-c" codegen flags. This adds a link to the codegen docs for each synonym.
2019-02-17Fix doc for rustc "-g" flagGuy Taylor-1/+1
The rustc "-g" CLI flag was miss documented to be a synonym of "-C debug-level=2" and not the correct "-C debuginfo=2".
2019-02-17Modify doctest's auto-`fn main()` to allow `Result`sAndre Bogus-0/+17
This lets the default `fn main()` unwrap any `Result`s, which allows the use of `?` in most tests without adding it manually.
2019-02-17Mention capping forbid lintsDale Wijnand-1/+3
I felt the description of forbid was misleading/incomplete without mentioning how --cap-lints interacts with it.
2019-02-14Rollup merge of #57856 - lzutao:fix-old-first-edition, r=steveklabnikMazdak Farrokhzad-4/+4
Convert old first edition links to current edition one r? @steveklabnik
2019-02-13Convert old doc links to current editionLzu Tao-4/+4
Use footnote style to bypass the tidy check
2019-02-12Add documentation about -Clinker-plugin-lto to rustc book.Michael Woerister-1/+110
2019-02-10Rollup merge of #58350 - petrochenkov:embed, r=frewsxcvGuillaume Gomez-0/+0
Fix failing tidy (line endings on Windows) Updates to `embedded-book` including https://github.com/rust-embedded/book/pull/127.
2019-02-10Fix failing tidy (line endings on Windows)Vadim Petrochenkov-0/+0
2019-02-09Some writing improvement, conciseness of introRobert Hayek-4/+3
2019-02-07Auto merge of #57998 - niklasf:align-enum, r=nagisabors-0/+42
Allow #[repr(align(x))] on enums (#57996) Tracking issue: #57996 Implements an extension of [RFC 1358](https://github.com/rust-lang/rfcs/blob/master/text/1358-repr-align.md) behind a feature flag (`repr_align_enum`). Originally introduced here for structs: #39999. It seems like only HIR-level changes are required, since enums are already aware of their alignment (due to alignment of their limbs). cc @bitshifter
2019-02-05Add Rustlings to the doc indexliv-0/+6
2019-02-04Update embedded book dependencyJames Munns-0/+0
2019-02-04Add embedded bookJames Munns-0/+16
2019-01-31Clarify semantics of #[repr(align(x))] on enumsNiklas Fiekas-0/+16
2019-01-30Allow #[repr(align(x))] on enums (#57996)Niklas Fiekas-0/+26