about summary refs log tree commit diff
path: root/src/doc
AgeCommit message (Collapse)AuthorLines
2025-04-04unstable book: document taitmejrs-0/+159
2025-04-03add some links about the rustdoc-gui test suitebinarycat-1/+5
2025-04-03Stabilize `cfg_boolean_literals`clubby789-22/+0
2025-04-03Auto merge of #139301 - matthiaskrgr:rollup-sa6ali8, r=matthiaskrgrbors-410/+565
Rollup of 7 pull requests Successful merges: - #139080 (Experimental feature gate for `super let`) - #139145 (slice: Remove some uses of unsafe in first/last chunk methods) - #139149 (unstable book: document import_trait_associated_functions) - #139273 (Apply requested API changes to `cell_update`) - #139282 (rustdoc: make settings checkboxes always square) - #139283 (Rustc dev guide subtree update) - #139294 (Fix the `f16`/`f128` feature gates on integer literals) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-03compiletest: Require `//~` annotations even if `error-pattern` is specifiedVadim Petrochenkov-0/+3
2025-04-03Rollup merge of #139283 - BoxyUwU:rdg-push, r=jieyouxuMatthias Krüger-410/+543
Rustc dev guide subtree update r? ``@jieyouxu`` ``@Kobzol``
2025-04-03Rollup merge of #139149 - mejrs:itaf, r=ehussMatthias Krüger-0/+22
unstable book: document import_trait_associated_functions Documents https://github.com/rust-lang/rust/issues/134691 which was implemented in https://github.com/rust-lang/rust/pull/134754
2025-04-03test directive can appear anywhere in the fileTshepang Mbambo-1/+2
2025-04-02Demote i686-pc-windows-gnu to Tier 2Noratrieb-10/+43
In accordance with RFC 3771. I also added a stub doc page for the target and renamed the windows-gnullvm page for consistency.
2025-04-02Merge from rustcJieyou Xu-148/+415
2025-04-02Preparing for merge from rustcJieyou Xu-1/+1
2025-04-02Rollup merge of #139184 - Urgau:crate-root-lint-levels, r=jieyouxuTakayuki Maeda-0/+23
Add unstable `--print=crate-root-lint-levels` This PR implements `--print=crate-root-lint-levels` from MCP 833 https://github.com/rust-lang/compiler-team/issues/833. Tracking issue: https://github.com/rust-lang/rust/issues/139180 Best reviewed commit by commit.
2025-04-02Rollup merge of #139212 - ehuss:update-mdbook, r=Mark-SimulacrumStuart Cook-2/+1
Update mdbook to 0.4.48 This brings in several updates. Two significant ones are to halve the search index size, and the other introduces major changes to footnote rendering. Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0448
2025-04-02Rollup merge of #139208 - futreall:master, r=jieyouxuStuart Cook-1/+1
fix dead link netbsd.md src/doc/rustc/src/platform-support/netbsd.md https://github.com/NetBSD/pkgsrc-wip/blob/master/rust/Makefile - https://github.com/NetBSD/pkgsrc-wip/blob/master/Makefile
2025-04-01Add unstable `--print=crate-root-lint-levels`Urgau-0/+23
2025-04-01Auto merge of #138492 - lcnr:rm-inline_const_pat, r=oli-obkbors-22/+0
remove `feature(inline_const_pat)` Summarizing https://rust-lang.zulipchat.com/#narrow/channel/144729-t-types/topic/remove.20feature.28inline_const_pat.29.20and.20shared.20borrowck. With https://github.com/rust-lang/types-team/issues/129 we will start to borrowck items together with their typeck parent. This is necessary to correctly support opaque types, blocking the new solver and TAIT/ATPIT stabilization with the old one. This means that we cannot really support `inline_const_pat` as they are implemented right now: - we want to typeck inline consts together with their parent body to allow inference to flow both ways and to allow the const to refer to local regions of its parent.This means we also need to borrowck the inline const together with its parent as that's necessary to properly support opaque types - we want the inline const pattern to participate in exhaustiveness checking - to participate in exhaustiveness checking we need to evaluate it, which requires borrowck, which now relies on borrowck of the typeck root, which ends up checking exhaustiveness again. **This is a query cycle**. There are 4 possible ways to handle this: - stop typechecking inline const patterns together with their parent - causes inline const patterns to be different than inline const exprs - prevents bidirectional inference, we need to either fail to compile `if let const { 1 } = 1u32` or `if let const { 1u32 } = 1` - region inference for inline consts will be harder, it feels non-trivial to support inline consts referencing local regions from the parent fn - inline consts no longer participate in exhaustiveness checking. Treat them like `pat if pat == const { .. }` instead. We then only evaluate them after borrowck - difference between `const { 1 }` and `const FOO: usize = 1; match x { FOO => () }`. This is confusing - do they carry their weight if they are now just equivalent to using an if-guard - delay exhaustiveness checking until after borrowck - should be possible in theory, but is a quite involved change and may have some unexpected challenges - remove this feature for now I believe we should either delay exhaustiveness checking or remove the feature entirely. As moving exhaustiveness checking to after borrow checking is quite complex I think the right course of action is to fully remove the feature for now and to add it again once/if we've got that implementation figured out. `const { .. }`-expressions remain stable. These seem to have been the main motivation for https://github.com/rust-lang/rfcs/issues/2920. r? types cc `@rust-lang/types` `@rust-lang/lang` #76001
2025-04-01Update mdbook to 0.4.48Eric Huss-2/+1
This brings in several updates. Two significant ones are to halve the search index size, and the other introduces major changes to footnote rendering. Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0448
2025-04-01fix link in netbsd.mdfutreall-1/+1
Update netbsd.md Update netbsd.md
2025-04-01Auto merge of #137535 - Kobzol:split-metadata, r=petrochenkovbors-0/+3
Introduce `-Zembed-metadata` to allow omitting full metadata from rlibs and dylibs This is a continuation of https://github.com/rust-lang/rust/pull/120855 (I was mentored by `@bjorn3` to move it forward). Most of the original code was written by bjorn3, I tried to clean it up a bit and add some documentation and tests. This PR introduces a new unstable compiler flag called `-Zembed-metadata=[no|yes]`, with the default being `yes` (see https://github.com/rust-lang/rust/issues/57076 for context). When set to `no`, rustc will only store a small metadata stub inside rlibs/dylibs instead of the full metadata, to keep their size smaller. It should be used in combination with `--emit=metadata`, so that the users of such a compiled library can still read the metadata from the corresponding `.rmeta` file. [This comment](https://github.com/rust-lang/rust/pull/120855#issuecomment-1937018169) shows an example of binary/artifact size wins that can be achieved using this approach. Contrary to https://github.com/rust-lang/rust/pull/120855, this PR only introduces the new flag, along with a couple of run-make tests and documentation, but does not yet use it in bootstrap to actually compile rustc. I plan to do that as a follow-up step (along with integration in Cargo, which should ideally just always pass this flag to reduce the size of target directories). Fixes https://github.com/rust-lang/rust/issues/23366 Closes https://github.com/rust-lang/rust/issues/29511 Fixes https://github.com/rust-lang/rust/issues/57076 Another attempt of https://github.com/rust-lang/rust/pull/93945 and https://github.com/rust-lang/rust/pull/120855. r? `@petrochenkov`
2025-03-31Add documentation of the option into the unstable bookJakub Beránek-0/+3
2025-03-30unstable book: document import_trait_associated_functionsmejrs-0/+22
2025-03-30Remove duplicate c-variadic.mdmejrs-26/+0
2025-03-30Fix partial clone linkclubby789-1/+1
2025-03-30add rustfmt settings fileTshepang Mbambo-127/+39
2025-03-30example assumes a static existsTshepang Mbambo-2/+2
This was removed, likely by mistake, during a refactor.
2025-03-29update rustc-{driver,interface} examplesTshepang Mbambo-13/+12
2025-03-29Merge pull request #2289 from y1lan/fix_compiler_err_of_examplesTshepang Mbambo-17/+16
Fix compile errors of all the examples
2025-03-30Merge pull request #2288 from rust-lang/tshepang-known-bug-takes-args许杰友 Jieyou Xu (Joe)-0/+8
mention that known-bug test directive takes arguments
2025-03-29mention that know-bug test directive takes argumentsTshepang Mbambo-0/+8
2025-03-29compiletest: Support matching diagnostics on lines belowVadim Petrochenkov-0/+15
2025-03-28Fix trivial typo of `BoundVariableKind`Samuel Tardieu-1/+1
2025-03-28Fix code generation linkSantiago Pastorino-1/+1
2025-03-28Rollup merge of #139038 - adamgreig:thumb-target-maintainers, r=NoratriebMatthias Krüger-10/+5
Update target maintainers for thumb targets to reflect new REWG Arm team name Closes #139027 The name of the team responsible for these targets has changed as the team was merged with other Arm-related teams (see https://github.com/rust-embedded/wg/pull/818). The link gives an up-to-date list of github usernames that can be pinged, whereas the old email address is not very actively maintained or tracked.
2025-03-27Try to more clearly specify exactly what the runtool flags doEric Huss-3/+8
2025-03-27Show an example of using multiple ignore attributesEric Huss-0/+9
2025-03-27Remove and stabilize --enable-per-target-ignoresEric Huss-35/+28
This removes the `--enable-per-target-ignores` and enables it unconditionally.
2025-03-27Stabilize --test-runtool and --test-runtool-argEric Huss-19/+17
2025-03-27Rename `--runtool` and `--runtool-arg`Eric Huss-3/+3
This renames `--runtool` and `--runtool-arg` to `--test-runtool` and `--test-runtool-arg` to maintain consistency with other `--test-*` arguments.
2025-03-28Update target maintainers for thumb targets to reflect new REWG Arm team nameAdam Greig-10/+5
2025-03-27Rollup merge of #139010 - madsmtm:parse-xcrun-better, r=wesleywiserJacob Pratt-6/+12
Improve `xcrun` error handling The compiler invokes `xcrun` on macOS when linking Apple targets, to find the Xcode SDK which contain all the necessary linker stubs. The error messages that `xcrun` outputs aren't always that great though, so this PR tries to improve that by providing extra context when an error occurs. Fixes https://github.com/rust-lang/rust/issues/56829. Fixes https://github.com/rust-lang/rust/issues/84534. Part of https://github.com/rust-lang/rust/issues/129432. See also the alternative https://github.com/rust-lang/rust/pull/131433. Tested on: - `x86_64-apple-darwin`, MacBook Pro running Mac OS X 10.12.6 - With no tooling installed - With Xcode 9.2 - With Xcode 9.2 Commandline Tools - `aarch64-apple-darwin`, MacBook M2 Pro running macOS 14.7.4 - With Xcode 13.4.1 - With Xcode 16.2 - Inside `nix-shell -p xcbuild` (nixpkgs' `xcrun` shim) - `aarch64-apple-darwin`, VM running macOS 15.3.1 - With no tooling installed - With Xcode 16.2 Commandline Tools ``@rustbot`` label O-apple r? compiler CC ``@BlackHoleFox`` ``@thomcc``
2025-03-27Delete from_method from rustc_on_unimplemented documentationmejrs-3/+0
2025-03-27Rollup merge of #138946 - Urgau:platform-support-bottom, r=jieyouxuStuart Cook-13/+16
Un-bury chapters from the chapter list in rustc book This PR moves the "Platform Support" section to the bottom of rustc chapter book, as to un-burry chapters from the chapter list, which where hidden by the wall of targets. | Before | After | |--------|-------| | ![image](https://github.com/user-attachments/assets/92769307-eadb-4d9d-bdbb-9e610207eb79) | ![image](https://github.com/user-attachments/assets/1834f5c5-a1e6-4674-9be2-1094d1376eda) | r? ````@jieyouxu````
2025-03-27Rollup merge of #138624 - LukasWoodtli:gardena/lw/mipsel-maintainer, r=jieyouxuStuart Cook-1/+30
Add mipsel maintainer
2025-03-27Document how the SDK is found if SDKROOT is not setMads Marquart-6/+12
I've intentionally used slightly vague language ("roughly"), as we don't want to guarantee the exact invocation of `xcrun`, just hint that it's close to that.
2025-03-25Rollup merge of #138905 - Gelbpunkt:powerpc64-unknown-linux-musl-maintainer, ↵Jacob Pratt-1/+54
r=compiler-errors Add target maintainer information for powerpc64-unknown-linux-musl We intend to fix the outstanding issues on the target and eventually promote it to tier 2. We have the capacity to maintain this target in the future and already perform regular builds of rustc for this target. Currently, all host tools except miri build fine, but I have a patch for libffi-sys to make miri also compile fine for this target that is [pending review](https://github.com/tov/libffi-rs/pull/100). While at it, add an option for the musl root for this target. I also added a kernel version requirement, which is rather arbitrarily chosen, but it matches our tier 2 powerpc64le-unknown-linux-musl target so I think it is a good fit.
2025-03-25Move Platform Support section to the bottom of rustc chapter bookUrgau-13/+16
2025-03-25compiletest: Support matching on diagnostics without a spanVadim Petrochenkov-4/+22
2025-03-24Add target maintainer information for powerpc64-unknown-linux-muslJens Reidel-1/+54
We intend to fix the outstanding issues on the target and eventually promote it to tier 2. We have the capacity to maintain this target in the future and already perform regular builds of rustc for this target. Currently, all host tools except miri build fine, but I have a patch for libffi-sys to make miri also compile fine for this target that is pending review [1]. While at it, add an option for the musl root for this target. [1]: https://github.com/tov/libffi-rs/pull/100 Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2025-03-24Rollup merge of #138894 - rustbot:docs-update, r=ehussMatthias Krüger-0/+0
Update books ## rust-lang/book 23 commits in 81a976a237f84b8392c4ce1bd5fd076eb757a2eb..45f05367360f033f89235eacbbb54e8d73ce6b70 2025-03-21 23:23:52 UTC to 2025-03-13 14:14:37 UTC - Ch. 21: call out Chrome multiple-connections issue (rust-lang/book#4297) - Ch. 16: refactor 16-6 to using listing component (rust-lang/book#4295) - Ch. 01: Show how to work offline (rust-lang/book#4294) - Ch. 07: Clarify sentences about `pub use` (rust-lang/book#4293) - Ch. 02: Consistent ordering of `use` statements (rust-lang/book#4292) - Anchors on listings (rust-lang/book#4271) - Ch. 17: another tweak to how we phrase things about sections (rust-lang/book#4288) - Ch. 20: correct listing number (rust-lang/book#4287) - Ch. 10.3: clarify language detail (rust-lang/book#4284) - Ch. 17: minor typos and link reference (rust-lang/book#4286) - Ch. 9: correctly demonstrate privacy with module (rust-lang/book#4282) - Ch. 18: correct discussion of delegation in `Post` methods (rust-lang/book#4281) - Ch. 20: tell folks to see the Reference for more ABI info (rust-lang/book#4165) - Ch 10.1 minor clarifications (rust-lang/book#4256) - Clarified the misunderstanding b/w crates, module, items (rust-lang/book#4232) - Ferris: always show, even when it’s small (rust-lang/book#4280) - Ch. 17: mention `use std::pin::{Pin, pin};` on introduction (rust-lang/book#4279) - Persist printing error, NOT ErrorKind (rust-lang/book#4259) - Typo: "2" should be "2 seconds" (rust-lang/book#4263) - Ch. 17: fix tiny example consistency issue (rust-lang/book#4270) - Bump ring from 0.17.8 to 0.17.13 in /listings/ch17-async-await/listing-17-02 (rust-lang/book#4261) - Bump ring from 0.17.8 to 0.17.14 in /packages/trpl (rust-lang/book#4273) - 2024 Print Edition: updates to Word docs and more fixes to Markdown text (rust-lang/book#4272) ## rust-lang/reference 5 commits in dda31c85f2ef2e5d2f0f2f643c9231690a30a626..e95ebdfee02514d93f79ec92ae310a804e87f01f 2025-03-24 15:56:46 UTC to 2025-03-18 02:25:06 UTC - Fix diagnostic attribute typo (rust-lang/reference#1767) - Mention that “every address” ≠ “every pointer” (rust-lang/reference#1761) - Rework range pattern rules (rust-lang/reference#1756) - Use warning block in behavior-considered-undefined (rust-lang/reference#1759) - Add reference for asm-goto (rust-lang/reference#1693)
2025-03-24Rollup merge of #138864 - Urgau:rework-print-options-doc, r=jieyouxuMatthias Krüger-52/+214
Rework `--print` options documentation This PR reworks the `--print` options documentation, by making it more like codegen options with a dedicated page. I also added some examples and split some paragraph into multiple paragraph since we now have more place. r? ```@jieyouxu```