about summary refs log tree commit diff
path: root/src/doc
AgeCommit message (Collapse)AuthorLines
2025-06-13Rollup merge of #142248 - heiher:loong32-asm-types, r=AmanieuMatthias Krüger-0/+5
Add supported asm types for LoongArch32 r? ``````@Amanieu``````
2025-06-13Rollup merge of #142413 - tshepang:rdg-push, r=jieyouxuMatthias Krüger-3/+4
rustc-dev-guide subtree update r? `@ghost`
2025-06-13Unimplement unsized_localsmejrs-177/+2
2025-06-12Introduce `-Zmacro-stats`.Nicholas Nethercote-0/+24
It collects data about macro expansions and prints them in a table after expansion finishes. It's very useful for detecting macro bloat, especially for proc macros. Details: - It measures code snippets by pretty-printing them and then measuring lines and bytes. This required a bunch of additional pretty-printing plumbing, in `rustc_ast_pretty` and `rustc_expand`. - The measurement is done in `MacroExpander::expand_invoc`. - The measurements are stored in `ExtCtxt::macro_stats`.
2025-06-12Merge from rustcThe rustc-dev-guide Cronjob Bot-30/+50
2025-06-12Preparing for merge from rustcThe rustc-dev-guide Cronjob Bot-1/+1
2025-06-11Rollup merge of #142298 - jieyouxu:loongarch-maintainer-list, r=fee1-deadMatthias Krüger-2/+2
Make loongarch-none target maintainers more easily pingable In the same style as rust-lang/rust#139028. r? compiler
2025-06-11Rollup merge of #142297 - jieyouxu:needs-target-std, r=KobzolMatthias Krüger-0/+1
Implement `//@ needs-target-std` compiletest directive Closes rust-lang/rust#141863. Needed to unblock rust-lang/rust#139244 and rust-lang/rust#141856. ### Summary This PR implements a `//@ needs-target-std` compiletest directive that gates test execution based on whether the target supports std or not. For some cases, this should be preferred over e.g. some combination of `//@ ignore-none`, `//@ ignore-nvptx` and more[^none-limit]. ### Implementation limitation Unfortunately, since there is currently [no reliable way to determine from metadata whether a given target supports std or not](https://github.com/rust-lang/rust/issues/142296), we have to resort to a hack. Bootstrap currently determines whether or not a target supports std by a naive target tuple substring comparison: a target supports std if its target tuple does *not* contain one of `["-none", "nvptx", "switch"]` substrings. This PR simply pulls that hack out into `build_helpers` to avoid reimplementing the same hack in compiletest, and uses that logic to inform `//@ needs-target-std`. ### Auxiliary changes This PR additionally changes a few run-make tests to use `//@ needs-target-std` over an inconsistent combination of target-based `ignore`s. This should help with rust-lang/rust#139244. --- r? bootstrap [^none-limit]: Notably, `target_os = "none"` is **not** a sufficient condition for "target does not support std"
2025-06-11Update extracted-doctest feature documentationGuillaume Gomez-5/+19
2025-06-11that was phrased like a separate sentenceTshepang Mbambo-1/+1
2025-06-10Using git § I changed a submodule by accident: be explicitlolbinarycat-1/+2
Rewriting git history is something that is often difficult for new contributors, and we're already explaining the `<foo>` placeholder syntax, so I think it makes sense to be explicit about what exactly the paths mean.
2025-06-10Make loongarch-none target maintainers more easily pingableJieyou Xu-2/+2
2025-06-10Document `//@ needs-target-std` in rustc-dev-guideJieyou Xu-0/+1
2025-06-10Add supported asm types for LoongArch32WANG Rui-0/+5
2025-06-10platform-support.md: Mention specific Linux kernel version or laterTeoh Han Hui-19/+19
2025-06-09Rollup merge of #142228 - tshepang:rust-push, r=jieyouxuMatthias Krüger-275/+230
rustc-dev-guide subtree update r? `@ghost`
2025-06-09Merge from rustcThe rustc-dev-guide Cronjob Bot-15/+85
2025-06-09Preparing for merge from rustcThe rustc-dev-guide Cronjob Bot-1/+1
2025-06-08Rollup merge of #142053 - heiher:loong32-none, r=wesleywiserJubilee-13/+32
Add new Tier-3 targets: `loongarch32-unknown-none*` MCP: https://github.com/rust-lang/compiler-team/issues/865 NOTE: LoongArch32 ELF object support is available starting with object v0.37.0.
2025-06-08remove the archived ICE ping groupscyrgani-144/+4
2025-06-07Rollup merge of #140560 - Urgau:test_attr-module-level, r=GuillaumeGomezGuillaume Gomez-9/+23
Allow `#![doc(test(attr(..)))]` everywhere This PR adds the ability to specify [`#![doc(test(attr(..)))]`](https://doc.rust-lang.org/nightly/rustdoc/write-documentation/the-doc-attribute.html#testattr) ~~at module level~~ everywhere in addition to allowing it at crate-root. This is motivated by a recent PR #140323 (by ````@tgross35)```` where we have to duplicate 2 attributes to every single `f16` and `f128` doctests, by allowing `#![doc(test(attr(..)))]` at module level (and everywhere else) we can omit them entirely and just have (in both module): ```rust #![doc(test(attr(feature(cfg_target_has_reliable_f16_f128))))] #![doc(test(attr(expect(internal_features))))] ``` Those new attributes are appended to the one found at crate-root or at a previous module. Those "global" attributes are compatible with merged doctests (they already were before). Given the small addition that this is, I'm proposing to insta-stabilize it, but I can feature-gate it if preferred. Best reviewed commit by commit. r? ````@GuillaumeGomez````
2025-06-07Fix typoLeón Orell Valerian Liehr-3/+4
2025-06-07Merge pull request #2298 from fmease/rustdoc-testing-addendumLeón Orell Valerian Liehr-127/+200
rustdoc: Further improve chapters and sections on testing
2025-06-07rustdoc: Further improve chapters and sections on testingLeón Orell Valerian Liehr-127/+200
2025-06-06Add `-Z hint-mostly-unused` to tell rustc that most of a crate will go unusedJosh Triplett-0/+33
This hint allows the compiler to optimize its operation based on this assumption, in order to compile faster. This is a hint, and does not guarantee any particular behavior. This option can substantially speed up compilation if applied to a large dependency where the majority of the dependency does not get used. This flag may slow down compilation in other cases. Currently, this option makes the compiler defer as much code generation as possible from functions in the crate, until later crates invoke those functions. Functions that never get invoked will never have code generated for them. For instance, if a crate provides thousands of functions, but only a few of them will get called, this flag will result in the compiler only doing code generation for the called functions. (This uses the same mechanisms as cross-crate inlining of functions.) This does not affect `extern` functions, or functions marked as `#[inline(never)]`. Some performance numbers, based on a crate with many dependencies having just *one* large dependency set to `-Z hint-mostly-unused` (using Cargo's `profile-rustflags` option): A release build went from 4m07s to 2m04s. A non-release build went from 2m26s to 1m28s.
2025-06-06Add new Tier-3 targets: `loongarch32-unknown-none*`WANG Rui-13/+32
MCP: https://github.com/rust-lang/compiler-team/issues/865
2025-06-05Rollup merge of #141970 - onur-ozkan:skip-stage1-std, r=KobzolMatthias Krüger-0/+8
implement new `x` flag: `--skip-std-check-if-no-download-rustc` One of our developers (``@RalfJung)`` [reported](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Surprising.20stages.20for.20check.20build.20after.20stage.20reorg/with/521925606)[#t-infra/bootstrap > Surprising stages for check build after stage reorg](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Surprising.20stages.20for.20check.20build.20after.20stage.20reorg/with/521925606) that working on both the compiler and the library simultaneously with RA enabled is extremely difficult because checking library creates a heavy load on machines (by building stage1 compiler) on each modification. `--skip-std-check-if-no-download-rustc` flag is intended to reduce this heavy load on their IDE integration as much as possible. Fixes: rust-lang/rust#141955
2025-06-05Rollup merge of #141962 - BoxyUwU:rdg-push, r=jieyouxuMatthias Krüger-15/+35
rustc-dev-guide subtree update r? ``@jieyouxu``
2025-06-04Rollup merge of #142017 - ↵Matthias Krüger-1/+1
Rageking8:fix-incorrect-use-of-recommend-over-recommended, r=lqd Fix incorrect use of "recommend" over "recommended" Spotted this typo in rust-lang/rust#141554, but it has since been merged. r? `@Noratrieb`
2025-06-04triagebot: avoid unnecessary line break in PR welcome messageJieyou Xu-2/+2
2025-06-04document `skip-std-check-if-no-download-rustc` in rustc-dev-guideonur-ozkan-0/+8
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-06-04Merge pull request #2454 from rust-lang/tshepang-expand许杰友 Jieyou Xu (Joe)-2/+6
2025-06-04Fix incorrect use of "recommend" over "recommended"Rageking8-1/+1
2025-06-04Fix incorrect use of "recommend" over "recommended"Rageking8-1/+1
2025-06-04Rollup merge of #138699 - psumbera:solaris-ci-build3, r=marcoieniMatthias Krüger-3/+5
build dist for x86_64-pc-solaris and sparcv9-sun-solaris try-job: dist-sparcv9-solaris try-job: dist-x86_64-solaris try-job: dist-various-2 try-job: dist-x86_64-illumos
2025-06-04expand meaning of ~? diagnostic annotationTshepang Mbambo-2/+6
2025-06-03Auto merge of #141961 - matthiaskrgr:rollup-r09j2sp, r=matthiaskrgrbors-0/+0
Rollup of 8 pull requests Successful merges: - rust-lang/rust#141724 (fix(rust-lang/rust#141141): When expanding `PartialEq`, check equality of scalar types first.) - rust-lang/rust#141833 (`tests/ui`: A New Order [2/N]) - rust-lang/rust#141861 (Switch `x86_64-msvc-{1,2}` back to Windows Server 2025 images) - rust-lang/rust#141914 (redesign stage 0 std follow-ups) - rust-lang/rust#141918 (Deconstruct values in the THIR visitor) - rust-lang/rust#141923 (Update books) - rust-lang/rust#141931 (Deconstruct values in the THIR visitor) - rust-lang/rust#141956 (Remove two trait methods from cg_ssa) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-03Merge pull request #2450 from jieyouxu/pr_message许杰友 Jieyou Xu (Joe)-0/+17
2025-06-03Rollup merge of #141923 - rustbot:docs-update, r=ehussMatthias Krüger-0/+0
Update books ## rust-lang/book 4 commits in 230c68bc1e08f5f3228384a28cc228c81dfbd10d..634724ea85ebb08a542970bf8871ac8b0f77fd15 2025-05-29 13:16:14 UTC to 2025-05-22 21:35:03 UTC - Chapter 10 from tech review (rust-lang/book#4379) - Chapter 9 from tech review (rust-lang/book#4377) - Chapter 8 from tech review (rust-lang/book#4378) - Chapter 7 from tech review (rust-lang/book#4374) ## rust-embedded/book 3 commits in 0b8219ac23a3e09464e4e0166c768cf1c4bba0d5..10fa1e084365f23f24ad0000df541923385b73b6 2025-05-27 18:37:30 UTC to 2025-05-27 18:26:36 UTC - portability: add reference to embedded-hal docs (rust-embedded/book#391) - remove the unused and deprecated `multilingual` field from `book.toml` (rust-embedded/book#388) - Ci upgrade 20250522 (rust-embedded/book#393) ## rust-lang/nomicon 4 commits in c76a20f0d987145dcedf05c5c073ce8d91f2e82a..8b61acfaea822e9ac926190bc8f15791c33336e8 2025-05-26 10:16:09 UTC to 2025-05-23 15:03:00 UTC - Use inline const expression in unchecked-uninit.md (rust-lang/nomicon#492) - Fix code sample output in unchecked-uninit.md (rust-lang/nomicon#491) - Use consistent type parameters in subtyping.md (rust-lang/nomicon#493) - Fix typo in atomics.md (rust-lang/nomicon#494) ## rust-lang/reference 1 commits in 118fd1f1f0854f50e3ae1fe4b64862aad23009ca..8e0f593a30f3b56ddb0908fb7ab9249974e08738 2025-05-31 20:12:39 UTC to 2025-05-31 20:12:39 UTC - Minor fixes to `$crate` behavior (rust-lang/reference#1816) ## rust-lang/rust-by-example 4 commits in c9d151f9147c4808c77f0375ba3fa5d54443cb9e..21f4e32b8b40d36453fae16ec07ad4b857c445b6 2025-05-29 12:45:08 UTC to 2025-05-29 12:44:23 UTC - Update book.toml rename `author` field to `authors` (rust-lang/rust-by-example#1917) - Add example to comment.md to teach how to toggle a whole code block using block comments (rust-lang/rust-by-example#1919) - The example is not meant to be compiled with out passing arguments. (rust-lang/rust-by-example#1930) - added a shorthand for the #[should_panic(expected = "msg") (rust-lang/rust-by-example#1931)
2025-06-03Merge from rustcJieyou Xu-112/+61
2025-06-03Preparing for merge from rustcJieyou Xu-1/+1
2025-06-03triagebot: configure PR welcome message for no auto/explicit reviewerJieyou Xu-0/+17
2025-06-03Rollup merge of #141554 - Noratrieb:document-codegen-opts-better, r=bjorn3Matthias Krüger-3/+49
Improve documentation for codegen options This adds more information to many different codegen options. It should not add any new guarantees, just document existing behavior. r? bjorn3
2025-06-02Auto merge of #141912 - Kobzol:rollup-wurlnsx, r=Kobzolbors-0/+7
Rollup of 5 pull requests Successful merges: - rust-lang/rust#141767 (ci: use free runner for aarch64-gnu-llvm-19-1 PR job) - rust-lang/rust#141858 (Fix typo in `StructuralPartialEq` docs) - rust-lang/rust#141865 (Optionally don't steal the THIR) - rust-lang/rust#141874 (add f16_epsilon and f128_epsilon diagnostic items) - rust-lang/rust#141904 (test-float-parse: apply `cfg(not(bootstrap))`) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-02Update booksrustbot-0/+0
2025-06-02Merge pull request #2443 from smanilov/patch-21Tshepang Mbambo-1/+3
Simplify long sentence
2025-06-02Simplify long sentenceStan Manilov-1/+3
2025-06-02Merge pull request #2446 from fmease/fix-warning-blocksLeón Orell Valerian Liehr-1/+15
Fix some warning blocks that contain Markdown
2025-06-02Fix some warning blocks that contain MarkdownLeón Orell Valerian Liehr-1/+15
Contents inside of an HTML element only get interpreted as Markdown (as opposed to HTML) if its separated from the HTML tags with line breaks.
2025-06-02Merge pull request #2445 from smanilov/patch-23Tshepang Mbambo-9/+13
Add title and toc to Async chapter