about summary refs log tree commit diff
path: root/src/doc
AgeCommit message (Collapse)AuthorLines
2024-05-13Link to lint L-* labels许杰友 Jieyou Xu (Joe)-0/+2
2024-05-13Reword formatting for where clausesJosh Triplett-1/+1
Suggested-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
2024-05-13style-guide: Also format where clauses on one line for short function declsJosh Triplett-5/+15
2024-05-13style-guide: Not all where clauses can be written as inline boundsJosh Triplett-1/+1
2024-05-13style-guide: Give a second example for associated type formattingJosh Triplett-0/+1
Show an example that has bounds.
2024-05-13style-guide: Format single associated type `where` clauses on the same lineJosh Triplett-1/+13
In particular, lifetime-generic associated types often have a `where Self: 'a` bound, which we can format on the same line.
2024-05-12docs: fix typo in platform-support docsFederico Maria Morrone-1/+1
2024-05-12fix hidden title in command-line-arguments docsickk-1/+1
2024-05-11docs: Document x86_64-unknown-linux-none targetFederico Maria Morrone-0/+42
2024-05-11Update linker-plugin-lto.md to include LLVM 18Samson-1/+2
2024-05-11Update the rustc_interface examples for current rustc (#1974)Matthew Woodcraft-14/+14
2024-05-09Edit `Parameter Environments`'s url as it has been edited in #1953surechen-4/+4
2024-05-07Fuchsia test runner: fixup scriptMarc Khouri-6/+18
This commit fixes several issues in the fuchsia-test-runner.py script: 1. Migrate from `pm` to `ffx` for package management, as `pm` is now deprecated. Furthermore, the `pm` calls used in this script no longer work at Fuchsia's HEAD. This is the largest change in this commit, and impacts all steps around repository management (creation and registration of the repo, as well as package publishing). 2. Allow for `libtest` to be either statically or dynamically linked. The script assumed it was dynamically linked, but the current Rust behavior at HEAD is to statically link it. 3. Minor cleanup to use `ffx --machine json` rather than string parsing. 4. Minor cleanup to the docs around the script.
2024-05-06Auto merge of #124822 - matthiaskrgr:rollup-h7fc52t, r=matthiaskrgrbors-0/+0
Rollup of 3 pull requests Successful merges: - #124759 (Record impl args in the proof tree in new solver) - #124809 (borrowck: prepopulate opaque storage more eagerly) - #124815 (Update books) r? `@ghost` `@rustbot` modify labels: rollup
2024-05-06Auto merge of #124209 - Urgau:check-cfg-more-friendly-docs, r=ehussbors-62/+97
Make check-cfg docs more user-friendly This PR improves the `--check-cfg` to make them more user-friendly by: - explaining the purpose of the feature - removing the "form" jargon - making it (bit) less formal and more "friendly" - making the doc less cluttered - and by fixing (the width and flags) of the examples `@rustbot` label +F-check-cfg
2024-05-06Update booksrustbot-0/+0
2024-05-06Make check-cfg docs more user-friendlyUrgau-62/+97
2024-05-06Improve FALSE sentenceUrgau-1/+1
Co-authored-by: Tshepang Mbambo <tshepang@gmail.com>
2024-05-06Add documentation for check-cfg by-default in UI testsUrgau-0/+4
2024-05-06Rollup merge of #124742 - Urgau:check-cfg-rustfmt, r=fmeaseMatthias Krüger-1/+2
Add `rustfmt` cfg to well known cfgs list This PR adds the `rustfmt` cfg to the well known cfgs list. Related to https://github.com/rust-lang/rust/issues/124735
2024-05-06Auto merge of #124747 - MasterAwesome:master, r=davidtwcobors-0/+14
Support Result<T, E> across FFI when niche optimization can be used (v2) This PR is identical to #122253, which was approved and merged but then removed from master by a force-push due to a [CI bug](https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/ci.20broken.3F). r? ghost Original PR description: --- Allow allow enums like `Result<T, E>` to be used across FFI if the T/E can be niche optimized and the non-niche-optimized type is FFI safe. Implementation of https://github.com/rust-lang/rfcs/pull/3391 Tracking issue: https://github.com/rust-lang/rust/issues/110503 Additional ABI and codegen tests were added in https://github.com/rust-lang/rust/pull/115372
2024-05-05Document all Apple targets in rustc's platform supportMads Marquart-177/+371
- Fixed std support in top-level docs. - Added `*-apple-darwin` docs. - Added `i686-apple-darwin` docs. - Moved `aarch64-apple-ios-sim` to `*-apple-ios` and document all the iOS targets there. - Added `*-apple-ios-macabi` docs. - Add myself (madsmtm) as co-maintainer of most of these targets.
2024-05-05Add Apple notification group (#1964)Mads Marquart-0/+57
2024-05-05Rollup merge of #124749 - RossSmyth:stable_range, r=davidtwcoGuillaume Gomez-28/+1
Stabilize exclusive_range_pattern (v2) This PR is identical to #124459, which was approved and merged but then removed from master by a force-push due to a [CI bug](https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/ci.20broken.3F). r? ghost Original PR description: --- Stabilization report: https://github.com/rust-lang/rust/issues/37854#issuecomment-1842398130 FCP: https://github.com/rust-lang/rust/issues/37854#issuecomment-1872520294 Stabilization was blocked by a lint that was merged here: #118879 Documentation PR is here: rust-lang/reference#1484 `@rustbot` label +F-exclusive_range_pattern +T-lang
2024-05-05Rollup merge of #124148 - notriddle:notriddle/reference, r=GuillaumeGomezGuillaume Gomez-1/+9
rustdoc-search: search for references This feature extends rustdoc with syntax and search index information for searching borrow references. Part of https://github.com/rust-lang/rust/issues/60485 ## Preview - [`&mut`](https://notriddle.com/rustdoc-html-demo-11/reference/std/index.html?search=%26mut) - [`&Option<T> -> Option<&T>`](https://notriddle.com/rustdoc-html-demo-11/reference/std/index.html?search=%26Option%3CT%3E%20-%3E%20Option%3C%26T%3E) - [`&mut Option<T> -> Option<&mut T>`](https://notriddle.com/rustdoc-html-demo-11/reference/std/index.html?search=%26mut%20Option%3CT%3E%20-%3E%20Option%3C%26mut%20T%3E) Updated chapter of the book: https://notriddle.com/rustdoc-html-demo-11/reference/rustdoc/read-documentation/search.html ## Motivation See https://github.com/rust-lang/rust/pull/119676 ## Guide-level explanation You can't search by lifetimes, but other than that it's the same syntax references normally use. ## Reference-level description <table> <thead> <tr> <th>Shorthand</th> <th>Explicit names</th> </tr> </thead> <tbody> <tr><td colspan="2">Before this PR</td></tr> <tr> <td><code>[]</code></td> <td><code>primitive:slice</code> and/or <code>primitive:array</code></td> </tr> <tr> <td><code>[T]</code></td> <td><code>primitive:slice&lt;T&gt;</code> and/or <code>primitive:array&lt;T&gt;</code></td> </tr> <tr> <td><code>!</code></td> <td><code>primitive:never</code></td> </tr> <tr> <td><code>()</code></td> <td><code>primitive:unit</code> and/or <code>primitive:tuple</code></td> </tr> <tr> <td><code>(T)</code></td> <td><code>T</code></td> </tr> <tr> <td><code>(T,)</code></td> <td><code>primitive:tuple&lt;T&gt;</code></td> </tr> <tr> <td><code>(T, U -> V, W)</code></td> <td><code>fn(T, U) -> (V, W)</code>, Fn, FnMut, and FnOnce</td> </tr> <tr><td colspan="2">New additions with this PR</td></tr> <tr> <td><code>&</code></td> <td><code>primitive:reference</td> </tr> <tr> <td><code>&mut</code></td> <td><code>primitive:reference&lt;keyword:mut&gt;</td> </tr> <tr> <td><code>&T</code></td> <td><code>primitive:reference&lt;T&gt;</td> </tr> <tr> <td><code>&mut T</code></td> <td><code>primitive:reference&lt;keyword:mut, T&gt;</td> </tr> </tbody> </table> ### Search query grammar <code><pre><strong>borrow-ref = AMP *WS [MUT] *WS [arg]</strong> arg = [type-filter *WS COLON *WS] (path [generics] / slice-like / tuple-like / <strong>borrow-ref</strong>)</pre></code> ``` AMP = "&" MUT = "mut" ``` ## Future direction As described in https://github.com/rust-lang/rust/pull/118194 and https://github.com/rust-lang/rust/pull/119676 * The remaining type expression grammar (this is another step in the type expression grammar: `ReferenceType` is now supported) * Search subtyping and traits
2024-05-05Add `rustfmt` cfg to well known cfgs listUrgau-1/+2
2024-05-04docs(hermit): Explain Hermit's template linkbarrett-1/+1
Co-authored-by: Jubilee <46493976+workingjubilee@users.noreply.github.com>
2024-05-04fix(docs): Correct Hermit links to loader + 'rusty-demo'Barrett-3/+3
Both are renamed! Sorry for the initial incorrect commit, but this should correct it. 😄
2024-05-04docs(fix): incorrect Hermit links in the rustc bookBarrett-4/+4
the Hermit team seems to have moved from `hermitcore` to `hermit-os` on GitHub. this change corrects the old links on its target page.
2024-05-04Add `-` (stdin) support to rustdocUrgau-0/+6
2024-05-04Add an example how to add a job to PR CIJakub Beránek-1/+15
2024-05-04Update CI documentation to avoid mentioning `expand-yaml-anchors`Jakub Beránek-29/+25
2024-05-03Rollup merge of #124480 - Enselic:on-broken-pipe, r=jieyouxuMichael Goulet-62/+84
Change `SIGPIPE` ui from `#[unix_sigpipe = "..."]` to `-Zon-broken-pipe=...` In the stabilization [attempt](https://github.com/rust-lang/rust/pull/120832) of `#[unix_sigpipe = "sig_dfl"]`, a concern was [raised ](https://github.com/rust-lang/rust/pull/120832#issuecomment-2007394609) related to using a language attribute for the feature: Long term, we want `fn lang_start()` to be definable by any crate, not just libstd. Having a special language attribute in that case becomes awkward. So as a first step towards the next stabilization attempt, this PR changes the `#[unix_sigpipe = "..."]` attribute to a compiler flag `-Zon-broken-pipe=...` to remove that concern, since now the language is not "contaminated" by this feature. Another point was [also raised](https://github.com/rust-lang/rust/pull/120832#issuecomment-1987023484), namely that the ui should not leak **how** it does things, but rather what the **end effect** is. The new flag uses the proposed naming. This is of course something that can be iterated on further before stabilization. Tracking issue: https://github.com/rust-lang/rust/issues/97889
2024-05-03Add -Zfixed-x18Alice Ryhl-0/+32
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
2024-05-02Stabilize exclusive_rangeRoss Smyth-28/+1
2024-05-02Change `SIGPIPE` ui from `#[unix_sigpipe = "..."]` to `-Zon-broken-pipe=...`Martin Nordholts-62/+84
In the stabilization attempt of `#[unix_sigpipe = "sig_dfl"]`, a concern was raised related to using a language attribute for the feature: Long term, we want `fn lang_start()` to be definable by any crate, not just libstd. Having a special language attribute in that case becomes awkward. So as a first step towards towards the next stabilization attempt, this PR changes the `#[unix_sigpipe = "..."]` attribute to a compiler flag `-Zon-broken-pipe=...` to remove that concern, since now the language is not "contaminated" by this feature. Another point was also raised, namely that the ui should not leak **how** it does things, but rather what the **end effect** is. The new flag uses the proposed naming. This is of course something that can be iterated on further before stabilization.
2024-05-01Auto merge of #124404 - jonathanpallant:arm-target-changes-new, r=chrisncbors-99/+577
Arm bare-metal target doc changes Updates the Arm bare-metal target docs: * Detailed pages for all the Cortex-M targets, including details about setting target-cpu and target-features to suit specific Arm models * More detail about the difference between `eabi` and `eabihf` * Marks the Embedded Devices Working Group Cortex-M Team as the maintainer of the Cortex-M targets
2024-05-01Auto merge of #121564 - ojeda:rustc-jobserver, r=ehussbors-0/+87
rustc: document the jobserver Explicitly document that the jobserver may be used by `rustc`, as well as recommend the `+` indicator for integration of `rustc` into GNU Make. In particular, show the warning to increase the chances that this document is found when searching for solutions online. In addition, add a note about the issue with GNU Make 4.3 since it is important that users realize they should do this even if they do not expect parallelism from `rustc`. Finally, show how to workaround the issue of `$(shell ...)` calls in recursive Make (which e.g. was needed for the Linux kernel). The GNU Make 4.4 case under `--jobserver-style=pipe` is not added since it got fixed after Rust 1.76.0 already (i.e. `rustc` will not warn if it finds the negative file descriptors). From: https://github.com/rust-lang/rust/issues/120515 Cc: `@petrochenkov` `@belovdv` `@weihanglo` `@bjorn3` --- v2: To be able to use tab characters for the Make examples, add `<!-- ignore-tidy-{check} -->` support to `tidy`. v3: Added "Integration with build systems" section to hold the GNU Make one. Added "by clearing the `MAKEFLAGS` variable". Added "aforementioned" so that it is clear we are talking about the warning above. v4: Added CMake subsection. Added a note that `rustc` may be affected by other flags, e.g. `CARGO_MAKEFLAGS`. v5: Added that `rustc` will choose the number of jobs if a jobserver is not passed.
2024-05-01Stabilize `custom_code_classes_in_docs` featureGuillaume Gomez-44/+38
2024-04-30arm target docs: clarify A32/T32/Arm ISA/Thumb ISA/Thumb-2 ISAJonathan Pallant-15/+36
2024-04-30Recapitalise ARMvX{-Y} to ArmvX{-Y}Jonathan Pallant-81/+81
Yes it looks weird, but this is how Arm write it now. I left ARM64 alone, because it's a Microsoft/Apple term but not an Arm term (they have Armv8-A and Armv9-A architectures, which say that A64 instructions are executed when in the Aarch64 state), and I don't want to get into that, especially for a Tier 1 target.
2024-04-30Rename `-Z verbose` to `-Z verbose-internals`Yutaro Ohno-3/+3
The `-Z verbose` option has been renamed to `-Z verbose-internals` in commit b5d83619 [1] (PR #119129 [2]). This commit updates the remaining `-Z verbose` to `-Z verbose-internals`. [1]: https://github.com/rust-lang/rust/commit/b5d8361909e9e30a11227aa773099c293a5dca55 [2]: https://github.com/rust-lang/rust/pull/119129
2024-04-30rustc: document the jobserverMiguel Ojeda-0/+87
Explicitly document that the jobserver may be used by `rustc` and show the warning to increase the chances that this document is found when searching for solutions online. In particular, add a section about the interaction with build systems, which is intended to contain recommendations on how to integrate `rustc` with different built systems. For GNU Make, recommend using the `+` indicator. In addition, add a note about the issue with GNU Make 4.3 since it is important that users realize they should do this even if they do not expect parallelism from `rustc`. Finally, show how to workaround the issue of `$(shell ...)` calls in recursive Make (which e.g. was needed for the Linux kernel). The GNU Make 4.4 case under `--jobserver-style=pipe` is not added since it got fixed after Rust 1.76.0 already (i.e. `rustc` will not warn if it finds the negative file descriptors). For CMake, recommend using `JOB_SERVER_AWARE` and show a workaround using `$(MAKE)` for earlier versions (when using the Makefile generator). From: https://github.com/rust-lang/rust/issues/120515 Cc: @petrochenkov @belovdv @weihanglo @bjorn3 Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2024-04-29arm target docs: small wording fixesJonathan Pallant-2/+2
2024-04-29Recommend to never display zero disambiguators when demangling v0 symbol namesMichael Woerister-0/+13
2024-04-29coverage: Replace boolean options with a `CoverageLevel` enumZalathar-6/+11
2024-04-29arm target docs: collapsed eabi and eabihf into oneJonathan Pallant-223/+56
2024-04-29Arm target doc wording tweaks based on review comments.Jonathan Pallant-27/+37
2024-04-29Adding new arm target docs to SUMMARY.mdJonathan Pallant-0/+7
2024-04-28typo traige->triageEmanuel Czirai-1/+1