about summary refs log tree commit diff
path: root/src/doc
AgeCommit message (Collapse)AuthorLines
2021-08-10Update booksEric Huss-0/+0
2021-08-11Rollup merge of #87881 - badboy:platform-support-formatting, r=ehussYuki Okushi-1/+1
Proper table row formatting in platform support Also moves the target into alphabetical order
2021-08-11Rollup merge of #87865 - tsoutsman:master, r=GuillaumeGomezYuki Okushi-22/+24
Clarify terms in rustdoc book Fixes #70898 I chose to completely remove the term directive over attribute because rustdoc has a lint called `invalid_codeblock_attributes` and the term attributes is used throughout the book. I slightly changed the introductory sentence to describe the relationship between annotations and attributes. I also moved the text explaining the example from below the blocks to above the blocks which is more in line with the rest of the book. I also changed the description for the `should_panic` attribute as I found it a little confusing. Finally, some of the blocks were `text` and some were `rust` so I changed them all to `text` which is in line with the rest of the book.
2021-08-10Replace #[plugin_registrar] with exporting __rustc_plugin_registrarbjorn3-19/+3
2021-08-10Remove a dead link in `new-target.md` + other nits (#1186)Rahul Butani-6/+8
2021-08-10STD support for the ESP-IDF frameworkivmarkov-0/+1
2021-08-09Proper table row formatting in platform supportJan-Erik Rediger-1/+1
Also moves the target into alphabetical order
2021-08-09Auto merge of #85357 - Andy-Python-Programmer:aarch64_uefi_target, ↵bors-0/+1
r=petrochenkov Add `aarch64-unknown-uefi` target This pull request adds the `aarch64-unknown-uefi` target.
2021-08-09Add the aarch64-unknown-uefi targetunknown-0/+1
* This commit adds the aarch64-unknown-uefi target and also adds it into the supported targets list under the tier-3 target table. * Uses the small code model by default Signed-off-by: Andy-Python-Programmer <andypythonappdeveloper@gmail.com>
2021-08-09Clarify terms in rustdoc bookKlim Tsoutsman-22/+24
Change code blocks to Rust
2021-08-07Add description of -opt-bisect-limit LLVM option (#1182)Bryan Cantrill-0/+13
2021-08-05Fixed team responsible for stabilization (#1181)Yoh Deadfall-2/+2
2021-08-04Promote `aarch64-apple-ios-sim` to Tier 2Jan-Erik Rediger-7/+6
As per MCP#428[1] this target becomes Tier 2. [1]: https://github.com/rust-lang/compiler-team/issues/428
2021-08-03Auto merge of #87515 - crlf0710:trait_upcasting_part2, r=bjorn3bors-0/+27
Trait upcasting coercion (part2) This is the second part of trait upcasting coercion implementation. Currently this is blocked on #86264 . The third part might be implemented using unsafety checking r? `@bjorn3`
2021-08-02Explicit notification of lack of support for `rust-docs` component forAli Malik-0/+4
Tier 2 targets
2021-08-02Another onenoproto-1/+1
2021-08-02Correct typonoproto-1/+1
2021-08-03Various adjustments to historic tests and documents.Charles Lew-6/+7
2021-08-03Added page to Unstable Book.Alexander Regueiro-0/+26
2021-08-02Rollup merge of #86176 - nbdd0121:explicit-generic-args, r=jackh726Cameron Steffen-0/+53
Implement a `explicit_generic_args_with_impl_trait` feature gate Implements #83701 When this gate is enabled, explicit generic arguments can be specified even if `impl Trait` is used in argument position. Generic arguments can only be specified for explicit generic parameters but not for the synthetic type parameters from `impl Trait` So code like this will be accepted: ```rust #![feature(explicit_generic_args_with_impl_trait)] fn foo<T: ?Sized>(_f: impl AsRef<T>) {} fn main() { foo::<str>("".to_string()); } ```
2021-08-02Auto merge of #87535 - lf-:authors, r=Mark-Simulacrumbors-2/+0
rfc3052 followup: Remove authors field from Cargo manifests Since RFC 3052 soft deprecated the authors field, hiding it from crates.io, docs.rs, and making Cargo not add it by default, and it is not generally up to date/useful information for contributors, we may as well remove it from crates in this repo.
2021-08-02Implement a `explicit_generic_args_with_impl_trait` feature gateGary Guo-0/+53
When this gate is enabled, explicit generic arguments can be specified even if `impl Trait` is used in argument position. Generic arguments can only be specified for explicit generic parameters but not for the synthetic type parameters from `impl Trait`
2021-07-30Fix missing word in commentWilfred Hughes-1/+1
2021-07-29rfc3052: Remove authors field from Cargo manifestsJade-2/+0
Since RFC 3052 soft deprecated the authors field anyway, hiding it from crates.io, docs.rs, and making Cargo not add it by default, and it is not generally up to date/useful information, we should remove it from crates in this repo.
2021-07-29Add S-Inactive PRs as another source of things contributors could work on ↵the8472-0/+6
(#1177)
2021-07-28git.md: Fix No-Merge Policy linkDave-1/+1
2021-07-28Stabilize `arbitrary_enum_discriminant`Deadbeef-37/+0
2021-07-28Rollup merge of #87315 - ricobbe:raw-dylib-unstable-book, r=wesleywiserYuki Okushi-0/+34
Add docs for raw-dylib to unstable book
2021-07-27Rollup merge of #87503 - ehuss:update-books, r=ehussYuki Okushi-0/+0
Update books ## nomicon 1 commits in 7a13537f96af4b9b8e3ea296d6e5c3c7ab72ce9f..f51734eb5566c826b471977747ea3d7d6915bbe9 2021-07-05 23:34:47 -0400 to 2021-07-23 18:24:35 +0900 - Add cloning example for dot operator behaviour (rust-lang/nomicon#292) ## reference 3 commits in 82d75cf423e4a7824fb36e73ccb18519d6900610..3b7be075af5d6e402a18efff672a8a265b4596fd 2021-07-15 06:49:08 -0700 to 2021-07-26 13:20:11 -0700 - Fix typos + grammar (rust-lang/reference#1037) - Expand on Unicode identifiers. (rust-lang/reference#1022) - Remove incorrect apostrophe (rust-lang/reference#1076) ## book 17 commits in eac55314210519238652f12b30fec9daea61f7fe..a07036f864b37896b31eb996cd7aedb489f69a1f 2021-07-19 11:08:01 -0400 to 2021-07-26 20:19:46 -0400 - Set expectations a bit more realistically - Snapshot of chapter 4 for nostarch - A few small wording tweaks in ch 4 - Clarify that it's not stack/heap exactly that matters for copy/non copy, fixes rust-lang/book#2799 - Clarify a detail around move. Fixes rust-lang/book#2413. - Clarify places that changed because of NLL. Fixes rust-lang/book#1939. - nostarch ch3 - Small edits to chapter 3 - (rust-lang/book#2797) - Update ch03-03-how-functions-work.md: Pervasive -&gt; Prevalent. (rust-lang/book#2796) - Address loop labels and continue. Fixes rust-lang/book#1392. - Clarify behavior of integer division. Fixes rust-lang/book#2248. - Demonstrate how scope interacts with shadowing - Add another cross-reference to the new unit type introduction - Introduce the unit type with tuples. Fixes rust-lang/book#1933. - Reword sentence to not have numbers separated only by a comma - Link directly to other installation page. Fixes rust-lang/book#1609 ## rust-by-example 1 commits in 1db6bb483cc87ad3b424d9aba764fe622960a1be..0dc9cd4e89f00cb5230f120e1a083916386e422b 2021-07-15 06:17:42 -0300 to 2021-07-23 09:14:27 -0300 - Grammatical mistake: Comparison as ... as the (rust-lang/rust-by-example#1453) ## rustc-dev-guide 2 commits in 93422c21baca585dc88357ec886a48f6ddc7d665..09343d6f921d2a07c66f8c41ec3d65bf1fa52556 2021-07-13 12:45:58 -0400 to 2021-07-26 00:37:28 +0200 - Fix typo in building/bootstrapping.md (rust-lang/rustc-dev-guide#1175) - Link directly to stabilization report comments (rust-lang/rustc-dev-guide#1173) ## edition-guide 4 commits in af696ce8ea526445590ae0ca66a8128d2a95a69a..3710b0cae783d0bcd2b42452a63b081473f5970a 2021-07-20 11:38:03 -0400 to 2021-07-26 11:34:46 -0700 - Add more consistent headings and add a migration section to reserving-syntax (rust-lang/edition-guide#263) - reserving-syntax.md: Expand and add detail (rust-lang/edition-guide#249) - Fix typo in or-patterns section (rust-lang/edition-guide#262) - Fix typo (rust-lang/edition-guide#261)
2021-07-27Rollup merge of #86450 - tmiasko:move-size-limit, r=pnkfelixYuki Okushi-0/+10
Add flag to configure `large_assignments` lint The `large_assignments` lints detects moves over specified limit. The limit is configured through `move_size_limit = "N"` attribute placed at the root of a crate. When attribute is absent, the lint is disabled. Make it possible to enable the lint without making any changes to the source code, through a new flag `-Zmove-size-limit=N`. For example, to detect moves exceeding 1023 bytes in a cargo crate, including all dependencies one could use: ``` $ env RUSTFLAGS=-Zmove-size-limit=1024 cargo build -vv ``` Lint tracking issue #83518.
2021-07-26Update booksEric Huss-0/+0
2021-07-26Fix typo in building/bootstrapping.md (#1175)Ben Reeves-1/+1
2021-07-22Add support for powerpc-unknown-freebsdPiotr Kubaj-0/+1
2021-07-21Rollup merge of #87346 - rylev:rename-force-warn, r=nikomatsakisEric Huss-3/+3
Rename force-warns to force-warn The renames the `--force-warns` option to `--force-warn`. This mirrors other lint options like `--warn` and `--deny` which are in the singular. r? `@nikomatsakis` cc `@ehuss` - this option is being used by Cargo. How do we make sure the transition to using the new name is as smooth as possible?
2021-07-21Rename force-warns to force-warnRyan Levick-3/+3
2021-07-20Link directly to stabilization report comments (#1173)Noah Lev-3/+9
Previously, readers had to scroll through tons of comments to find the report.
2021-07-20Fix ignore annotationRichard Cobbe-2/+1
2021-07-20Ignore example in automationRichard Cobbe-1/+2
2021-07-20Update booksEric Huss-0/+0
2021-07-20Auto merge of #87141 - spastorino:remove_impl_trait_in_bindings, r=oli-obkbors-28/+0
Remove impl trait in bindings Closes #86729 r? `@oli-obk`
2021-07-19Add docs for raw-dylib to unstable bookRichard Cobbe-0/+34
2021-07-18Remove impl_trait_in_bindings feature flagSantiago Pastorino-28/+0
2021-07-18Add doc for --nocaptureGuillaume Gomez-0/+7
2021-07-13Update for merge of CrateDisambiguator into StableCrateIdbjorn3-14/+15
2021-07-12Rollup merge of #87031 - ZuseZ4:patch-1, r=GuillaumeGomezYuki Okushi-1/+1
Update reference.md I ran into a link to the outdated src/doc/reference.md here: https://users.rust-lang.org/t/conditional-compilation-for-debug-release/1098/6 Apparently the Rust reference has moved again, so the link gave a 404 error. This should fix it.
2021-07-11Auto merge of #83918 - workingjubilee:stable-rangefrom-pat, r=joshtriplettbors-0/+53
Stabilize "RangeFrom" patterns in 1.55 Implements a partial stabilization of #67264 and #37854. Reference PR: https://github.com/rust-lang/reference/pull/900 # Stabilization Report This stabilizes the `X..` pattern, shown as such, offering an exhaustive match for unsigned integers: ```rust match x as u32 { 0 => println!("zero!"), 1.. => println!("positive number!"), } ``` Currently if a Rust author wants to write such a match on an integer, they must use `1..={integer}::MAX` . By allowing a "RangeFrom" style pattern, this simplifies the match to not require the MAX path and thus not require specifically repeating the type inside the match, allowing for easier refactoring. This is particularly useful for instances like the above case, where different behavior on "0" vs. "1 or any positive number" is desired, and the actual MAX is unimportant. Notably, this excepts slice patterns which include half-open ranges from stabilization, as the wisdom of those is still subject to some debate. ## Practical Applications Instances of this specific usage have appeared in the compiler: https://github.com/rust-lang/rust/blob/16143d10679537d3fde4247e15334e78ad9d55b9/compiler/rustc_middle/src/ty/inhabitedness/mod.rs#L219 https://github.com/rust-lang/rust/blob/673d0db5e393e9c64897005b470bfeb6d5aec61b/compiler/rustc_ty_utils/src/ty.rs#L524 And I have noticed there are also a handful of "in the wild" users who have deployed it to similar effect, especially in the case of rejecting any value of a certain number or greater. It simply makes it much more ergonomic to write an irrefutable match, as done in Katholieke Universiteit Leuven's [SCALE and MAMBA project](https://github.com/KULeuven-COSIC/SCALE-MAMBA/blob/05e5db00d553573534258585651c525d0da5f83f/WebAssembly/scale_std/src/fixed_point.rs#L685-L695). ## Tests There were already many tests in [src/test/ui/half-open-range/patterns](https://github.com/rust-lang/rust/tree/90a2e5e3fe59a254d4d707aa291517b3791ea5a6/src/test/ui/half-open-range-patterns), as well as [generic pattern tests that test the `exclusive_range_pattern` feature](https://github.com/rust-lang/rust/blob/673d0db5e393e9c64897005b470bfeb6d5aec61b/src/test/ui/pattern/usefulness/integer-ranges/reachability.rs), many dating back to the feature's introduction and remaining standing to this day. However, this stabilization comes with some additional tests to explore the... sometimes interesting behavior of interactions with other patterns. e.g. There is, at least, a mild diagnostic improvement in some edge cases, because before now, the pattern `0..=(5+1)` encounters the `half_open_range_patterns` feature gate and can thus emit the request to enable the feature flag, while also emitting the "inclusive range with no end" diagnostic. There is no intent to allow an `X..=` pattern that I am aware of, so removing the flag request is a strict improvement. The arrival of the `J | K` "or" pattern also enables some odd formations. Some of the behavior tested for here is derived from experiments in this [Playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=58777b3c715c85165ac4a70d93efeefc) example, linked at https://github.com/rust-lang/rust/issues/67264#issuecomment-812770692, which may be useful to reference to observe the current behavior more closely. In addition tests constituting an explanation of the "slicing range patterns" syntax issue are included in this PR. ## Desiderata The exclusive range patterns and half-open range patterns are fairly strongly requested by many authors, as they make some patterns much more natural to write, but there is disagreement regarding the "closed" exclusive range pattern or the "RangeTo" pattern, especially where it creates "off by one" gaps in the presence of a "catch-all" wildcard case. Also, there are obviously no range analyses in place that will force diagnostics for e.g. highly overlapping matches. I believe these should be warned on, ideally, and I think it would be reasonable to consider such a blocker to stabilizing this feature, but there is no technical issue with the feature as-is from the purely syntactic perspective as such overlapping or missed matches can already be generated today with such a catch-all case. And part of the "point" of the feature, at least from my view, is to make it easier to omit wildcard matches: a pattern with such an "open" match produces an irrefutable match and does not need the wild card case, making it easier to benefit from exhaustiveness checking. ## History - Implemented: - Partially via exclusive ranges: https://github.com/rust-lang/rust/pull/35712 - Fully with half-open ranges: https://github.com/rust-lang/rust/pull/67258 - Unresolved Questions: - The precedence concerns of https://github.com/rust-lang/rust/pull/48501 were considered as likely requiring adjustment but probably wanting a uniform consistent change across all pattern styles, given https://github.com/rust-lang/rust/issues/67264#issuecomment-720711656, but it is still unknown what changes might be desired - How we want to handle slice patterns in ranges seems to be an open question still, as witnessed in the discussion of this PR! I checked but I couldn't actually find an RFC for this, and given "approved provisionally by lang team without an RFC", I believe this might require an RFC before it can land? Unsure of procedure here, on account of this being stabilizing a subset of a feature of syntax. r? `@scottmcm`
2021-07-11Auto merge of #86416 - Amanieu:asm_clobber_only, r=nagisabors-0/+10
Add clobber-only register classes for asm! These are needed to properly express a function call ABI using a clobber list, even though we don't support passing actual values into/out of these registers.
2021-07-10Update reference.mdManuel Drehwald-1/+1
Apparently the Rust reference has moved again, so the link gave a 404 error.
2021-07-10Add clobber-only register classes for asm!Amanieu d'Antras-0/+10
These are needed to properly express a function call ABI using a clobber list, even though we don't support passing actual values into/out of these registers.
2021-07-08Minor capitalization fix (#1170)Eric Holk-1/+1