about summary refs log tree commit diff
path: root/src/doc
AgeCommit message (Collapse)AuthorLines
2025-06-16Use stage 1 for building docsAlice Ryhl-1/+1
2025-06-16Add infrastructure for emitting timing sectionsJakub Beránek-0/+28
2025-06-15Rollup merge of #133952 - bjorn3:remove_wasm_legacy_abi, r=alexcrichtonLeón Orell Valerian Liehr-117/+0
Remove wasm legacy abi Closes https://github.com/rust-lang/rust/issues/122532 Closes https://github.com/rust-lang/rust/issues/138762 Fixes https://github.com/rust-lang/rust/issues/71871 https://github.com/rust-lang/rust/issues/88152 Fixes https://github.com/rust-lang/rust/issues/115666 Fixes https://github.com/rust-lang/rust/issues/129486
2025-06-15Un-remap `rustc-dev` component pathsUrgau-0/+2
2025-06-14do not inline linksTshepang Mbambo-2/+5
2025-06-14title caseTshepang Mbambo-1/+1
2025-06-14use sentence caseTshepang Mbambo-11/+11
2025-06-14content has moved to another chapterTshepang Mbambo-2/+2
2025-06-14Merge pull request #2465 from xizheyin/rustc-queryTshepang Mbambo-39/+46
Adjust some doc for Query System
2025-06-14Merge pull request #2441 from rust-lang/tshepang-remove-title-caseTshepang Mbambo-28/+28
use consistent title capitalization
2025-06-14Remove outdated docs about broken ABIbjorn3-117/+0
2025-06-14Rollup merge of #141811 - mejrs:bye_locals, r=compiler-errorsMatthias Krüger-177/+2
Unimplement unsized_locals Implements https://github.com/rust-lang/compiler-team/issues/630 Tracking issue here: https://github.com/rust-lang/rust/issues/111942 Note that this just removes the feature, not the implementation, and does not touch `unsized_fn_params`. This is because it is required to support `Box<dyn FnOnce()>: FnOnce()`. There may be more that should be removed (possibly in follow up prs) - the `forget_unsized` function and `forget` intrinsic. - the `unsized_locals` test directory; I've just fixed up the tests for now - various codegen support for unsized values and allocas cc ``@JakobDegen`` ``@oli-obk`` ``@Noratrieb`` ``@programmerjake`` ``@bjorn3`` ``@rustbot`` label F-unsized_locals Fixes rust-lang/rust#79409
2025-06-14Rollup merge of #141399 - GuillaumeGomez:extracted-doctest, r=aDotInTheVoidMatthias Krüger-5/+19
[rustdoc] Give more information into extracted doctest information Follow-up of https://github.com/rust-lang/rust/pull/134531. This update fragment the doctest code into its sub-parts to give more control to the end users on how they want to use it. The new JSON looks like this: ```json { "format_version":2, "doctests":[ { "file":"$DIR/extract-doctests-result.rs", "line":8, "doctest_attributes":{ "original":"", "should_panic":false, "no_run":false, "ignore":"None", "rust":true, "test_harness":false, "compile_fail":false, "standalone_crate":false, "error_codes":[], "edition":null, "added_css_classes":[], "unknown":[] }, "original_code":"let x = 12;\nOk(())", "doctest_code":{ "crate_level":"#![allow(unused)]\n", "code":"let x = 12;\nOk(())", "wrapper":{ "before":"fn main() { fn _inner() -> core::result::Result<(), impl core::fmt::Debug> {\n", "after":"\n} _inner().unwrap() }", "returns_result":true } }, "name":"$DIR/extract-doctests-result.rs - (line 8)" } ] } ``` for this doctest: ```rust let x = 12; Ok(()) ``` With this, I think it matches what you need ``@ojeda?`` If so, once merged I'll update the patch I sent to RfL. r? ``@aDotInTheVoid``
2025-06-13Rollup merge of #142475 - wesleywiser:windows_msvc_maintainers, r=ChrisDentonJubilee-3/+73
Add platform support docs & maintainers for *-windows-msvc Thanks to `@ChrisDenton,` `@dpaoliello,` `@lambdageek` and `@sivadeilra` for agreeing to be target maintainers! cc rust-lang/rust#113739
2025-06-13Add platform support docs & maintainers for *-windows-msvcWesley Wiser-3/+73
2025-06-13Auto merge of #142443 - matthiaskrgr:rollup-l1l6d0v, r=matthiaskrgrbors-0/+5
Rollup of 9 pull requests Successful merges: - rust-lang/rust#128425 (Make `missing_fragment_specifier` an unconditional error) - rust-lang/rust#135927 (retpoline and retpoline-external-thunk flags (target modifiers) to enable retpoline-related target features) - rust-lang/rust#140770 (add `extern "custom"` functions) - rust-lang/rust#142176 (tests: Split dont-shuffle-bswaps along opt-levels and arches) - rust-lang/rust#142248 (Add supported asm types for LoongArch32) - rust-lang/rust#142267 (assert more in release in `rustc_ast_lowering`) - rust-lang/rust#142274 (Update the stdarch submodule) - rust-lang/rust#142276 (Update dependencies in `library/Cargo.lock`) - rust-lang/rust#142308 (Upgrade `object`, `addr2line`, and `unwinding` in the standard library) Failed merges: - rust-lang/rust#140920 (Extract some shared code from codegen backend target feature handling) r? `@ghost` `@rustbot` modify labels: rollup try-job: aarch64-apple try-job: x86_64-msvc-1 try-job: x86_64-gnu try-job: dist-i586-gnu-i586-i686-musl try-job: test-various
2025-06-13Adjust some doc for Query Systemxizheyin-39/+46
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
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