about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-10-02rustdoc: use same stage for all pr check docsMichael Howell-1/+1
2025-10-02rustdoc: add testcase for traitParent deduplicationbinarycat-0/+38
2025-10-02search.js: introduce optimized removeIdxListAsc routinebinarycat-9/+30
2025-10-02fix rustdoc tests broke by trait item filteringbinarycat-35/+42
2025-10-02if a trait item is shown in search results, hide the impl itembinarycat-61/+174
for example, if we're showing `Iterator::next`, we don't need to also show `Range::next` in the results. Co-authored-by: Michael Howell <michael@notriddle.com>
2025-09-21Auto merge of #146592 - Kobzol:tidy-diag, r=jieyouxubors-580/+781
Implement a simple diagnostic system for tidy In https://github.com/rust-lang/rust/pull/146316 and https://github.com/rust-lang/rust/pull/146580, contributors independently wanted to reduce the verbose output of tidy. But before, the output was quite ad-hoc, so it was not easy to control it. In this PR, I implemented a simple diagnostic system for tidy, which allows us to: 1) Only print certain information in verbose mode (`-v`) 2) Associate each (error) output to a specific check, so that it is easier to find out what exactly has failed and which check you might want to examine (not fully done, there are some random `println`s left, but most output should be scoped to a specific check) 3) Print output with colors, based on the message level (message, warning, error) 4) Show the start/end execution of each check in verbose mode, for better progress indication Failure output: <img width="1134" height="157" alt="image" src="https://github.com/user-attachments/assets/578a9302-e1c2-47e5-9370-a3556c49d9fc" /> Success output: <img width="388" height="113" alt="image" src="https://github.com/user-attachments/assets/cf27faf8-3d8b-49e3-88d0-fac27a9c36a8" /> Verbose output (shortened): <img width="380" height="158" alt="image" src="https://github.com/user-attachments/assets/ce7102b8-c2f3-42a8-a2ec-ca30389be91e" /> CC `@nnethercote` `@RalfJung` `@GuillaumeGomez` The first two commits and the last commit are interesting, the rest is just mechanical port of the code from `bad: &mut bool` to `DiagCtx` and `RunningCheck`. The `extra_checks` check could be further split, but I'd leave that for another PR. r? `@jieyouxu`
2025-09-21Implement output of colored messages with optional check contextJakub Beránek-55/+152
2025-09-21Migrate the remaining tidy checks to diagnosticsJakub Beránek-572/+560
2025-09-21Add `CheckId`, migrate the `alphabetical` check to diagnosticsJakub Beránek-45/+63
2025-09-21Add diagnostics context and migrate the `style` check to itJakub Beránek-89/+187
2025-09-21Auto merge of #146779 - GuillaumeGomez:gcc-ignore-test_ui_abi, r=Kobzol,jieyouxubors-0/+14
Ignore tests in `tests/ui/abi` for the GCC backend Needed for https://github.com/rust-lang/rust/pull/146414. Currently we ignore them in the GCC backend and until this situation changes, it'll block rust-lang/rust#146414. r? `@Kobzol`
2025-09-21Auto merge of #146830 - Zalathar:rollup-lj8jfok, r=Zalatharbors-111/+164
Rollup of 8 pull requests Successful merges: - rust-lang/rust#140983 (Improve doc of some methods that take ranges) - rust-lang/rust#144091 (Stabilize `new_zeroed_alloc`) - rust-lang/rust#145664 (Stabilize `std::panic::Location::file_as_c_str`) - rust-lang/rust#146551 (fix issue with `cmse-nonsecure-entry` ABI being both async and c-variadic) - rust-lang/rust#146744 (Deref related cleanups in ref_prop) - rust-lang/rust#146793 (naked_asm: emit a label starting with `func_end`) - rust-lang/rust#146820 (Add unstable attribute to BTreeMap-related allocator generics) - rust-lang/rust#146822 (Fix old typo in lang_start_internal comment) r? `@ghost` `@rustbot` modify labels: rollup
2025-09-21Rollup merge of #146822 - saethlin:bbbbbstd, r=NoratriebStuart Cook-1/+1
Fix old typo in lang_start_internal comment Noticed this when reading the rt cleanup code; the typo was introduced during a mass port of libstd to std in comments.
2025-09-21Rollup merge of #146820 - cammeresi:alloc-20250919, r=tgross35Stuart Cook-2/+11
Add unstable attribute to BTreeMap-related allocator generics Although these types aren't directly constructable externally, since they're pub, I think this omission was an oversight. r? libs-api
2025-09-21Rollup merge of #146793 - folkertdev:naked-asm-func-end, r=AmanieuStuart Cook-0/+7
naked_asm: emit a label starting with `func_end` The `cargo asm` tool (`cargo install cargo-show-asm`) pattern matches on such labels to figure out where functions end: normal functions generated by LLVM always do have such a label. We don't guarantee that naked functions emit such a label, but having `cargo asm` work is convenient. https://github.com/pacak/cargo-show-asm/blob/be45f67454ad8b634246a7fc69b3c6a963ee93f1/src/asm/statements.rs#L897-L901 To make the label name unique it's suffixed with the name of the current symbol. r? ```@Amanieu```
2025-09-21Rollup merge of #146744 - beepster4096:derefs_in_ref_prop, r=cjgillotStuart Cook-20/+13
Deref related cleanups in ref_prop Cherry picked from rust-lang/rust#146710 r? cjgillot
2025-09-21Rollup merge of #146551 - folkertdev:cmse-entry-c-variadic, r=workingjubileeStuart Cook-26/+105
fix issue with `cmse-nonsecure-entry` ABI being both async and c-variadic tracking issue: https://github.com/rust-lang/rust/issues/75835 fixes https://github.com/rust-lang/rust/issues/132142 An `extern "cmse-nonsecure-entry"` function cannot be c-variadic (or, in any case, clang/LLVM does not support it, see https://godbolt.org/z/MaPjzGcE1). So just stop looking at the type if we know it'll be invalid anyway. I'm not entirely sure how to test this. The ICE is only possible on the `thumbv8m.main-none-eabi` and some related targets. I think using `minicore` is the most convenient, but use of `async` requires quite a long list of lang items to be present. Maybe we want that anyway though? On the other hand, it's extra `minicore` surface that might go out of date. An alternative is `run-make`, that should work, but is much less convenient. See also [#t-compiler/help > &#96;async fn&#96; and &#96;minicore&#96;](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/.60async.20fn.60.20and.20.60minicore.60/with/539427262). r? `@ghost`
2025-09-21Rollup merge of #145664 - Darksonn:stab-file-with-nul, r=Mark-SimulacrumStuart Cook-2/+2
Stabilize `std::panic::Location::file_as_c_str` Closes: rust-lang/rust#141727 Nominating this for T-lang as per ```@traviscross``` https://github.com/rust-lang/rust/issues/141727#issuecomment-3201318429
2025-09-21Rollup merge of #144091 - thaliaarchi:stabilize-new-zeroed, r=Mark-SimulacrumStuart Cook-44/+9
Stabilize `new_zeroed_alloc` The corresponding `new_uninit` and `new_uninit_slice` functions were stabilized in rust-lang/rust#129401, but the zeroed counterparts were left for later out of a [desire](https://github.com/rust-lang/rust/issues/63291#issuecomment-2161039756) to stabilize only the minimal set. These functions are straightforward mirrors of the uninit functions and well-established. Since no blockers or design questions have surfaced in the past year, I think it's time to stabilize them. Tracking issue: rust-lang/rust#129396
2025-09-21Rollup merge of #140983 - tkr-sh:master, r=ibraheemdevStuart Cook-16/+16
Improve doc of some methods that take ranges Some methods that were taking some range in parameter were a bit inconsistent / unclear in the panic documentation. Here is the recap: - Replaced "start/end point" by "start/end bound" to be coherent with [`RangeBounds`](https://doc.rust-lang.org/stable/std/ops/trait.RangeBounds.html) naming (it's also easier to understand I think) - Previously, it was written "_[...] or if the end point is greater than the length of [...]_", but this is not entirely true! Actually, you can have a start bound that is greater than the length, with an end bound that is unbounded and it will also panic. Therefore I think that "_[...] one of the range bound is bounded and greater than the length of [...]_" is better! - `String` methods weren't mentionning that the method panics if `start_bound > end_bound` but it actually does! It uses `slice::range` which panics when `start > end`. (https://doc.rust-lang.org/stable/src/alloc/string.rs.html#1932-1934, https://doc.rust-lang.org/stable/src/core/slice/index.rs.html#835-837). You can also test it with: ```rs struct MyRange; impl std::ops::RangeBounds<usize> for MyRange { fn start_bound(&self) -> std::ops::Bound<&usize> { std::ops::Bound::Included(&3usize) } fn end_bound(&self) -> std::ops::Bound<&usize> { std::ops::Bound::Included(&1usize) } } fn main() { let mut s = String::from("I love Rust!"); s.drain(MyRange); // panics! } ```
2025-09-20Fix old typo in lang_start_internal commentBen Kimock-1/+1
2025-09-20Auto merge of #146812 - matthiaskrgr:rollup-aiap18m, r=matthiaskrgrbors-168/+316
Rollup of 5 pull requests Successful merges: - rust-lang/rust#144592 (generate list of all variants with `target_spec_enum`) - rust-lang/rust#146762 (Fix and provide instructions for running test suite on Apple simulators) - rust-lang/rust#146770 (fixes for numerous clippy warnings) - rust-lang/rust#146774 (Allow running `x <cmd> <path>` from a different directory) - rust-lang/rust#146800 (Fix unsupported `std::sys::thread` after move) r? `@ghost` `@rustbot` modify labels: rollup
2025-09-20[GCC backend] Ignore failing ui abi testsGuillaume Gomez-0/+14
2025-09-20Rollup merge of #146800 - thaliaarchi:fix-move-pal-thread, r=joboetMatthias Krüger-8/+3
Fix unsupported `std::sys::thread` after move Fixes building std for any platform with an unsupported thread abstraction. This includes {aarch64,armv7,x86_64}-unknown-trusty and riscv32im-risc0-zkvm-elf, which explicitly include the unsupported module, and platforms with no PAL. Bug fix for rust-lang/rust#145177 (std: move thread into sys). Also fix the `std` build for xtensa, which I incidentally found while looking for an unsupported platform. r? ``@joboet``
2025-09-20Rollup merge of #146774 - Kobzol:bootstrap-relative-path, r=jieyouxuMatthias Krüger-5/+17
Allow running `x <cmd> <path>` from a different directory Fixes: https://github.com/rust-lang/rust/issues/146772 r? ``@jieyouxu``
2025-09-20Rollup merge of #146770 - hkBst:clippy-fix-10, r=fmeaseMatthias Krüger-36/+32
fixes for numerous clippy warnings
2025-09-20Rollup merge of #146762 - madsmtm:test-apple-sim, r=jieyouxuMatthias Krüger-77/+245
Fix and provide instructions for running test suite on Apple simulators The following now works: ```sh ./x test --host='' --target aarch64-apple-ios-sim --skip tests/debuginfo ./x test --host='' --target aarch64-apple-tvos-sim --skip tests/debuginfo ./x test --host='' --target aarch64-apple-watchos-sim --skip tests/debuginfo ./x test --host='' --target aarch64-apple-visionos-sim --skip tests/debuginfo ``` I have documented the setup I used [in the `rustc-dev-guide`](https://rustc-dev-guide.rust-lang.org/tests/running.html#testing-on-emulators), it's fairly standard use of `remote-test-server` (with a small fix to library load paths which I've made in the first commit). I first tried the somewhat simpler `target.aarch64-apple-ios-sim.runner = "xcrun simctl spawn $UDID"`, but that doesn't work as required libraries etc. also need to be copied to the device. The debuginfo tests fail, I think because the debug info in `.dSYM` isn't available. I am yet unsure exactly how to fix this, either we need to copy that directory to the target as well, or we need to configure `lldb` somehow to read it from the host. I decided to not add this to our CI, since I suspect we wouldn't gain much from it? Running on the simulator still uses the host Darwin kernel, it's basically just configured to run in another mode with more restricted permissions and different system libraries. r? jieyouxu CC ``@simlay,`` you're a lot more familiar with `xcrun simctl` than I.
2025-09-20Rollup merge of #144592 - fee1-dead-contrib:target_spec, r=NoratriebMatthias Krüger-42/+19
generate list of all variants with `target_spec_enum` This helps us avoid the hardcoded lists elsewhere. r? ``@Noratrieb``
2025-09-20Auto merge of #146805 - lnicola:sync-from-ra, r=lnicolabors-9245/+38642
`rust-analyzer` subtree update Subtree update of `rust-analyzer` to https://github.com/rust-lang/rust-analyzer/commit/0c62c01aae05639bbc0605ade5435dfa6da96307. Created using https://github.com/rust-lang/josh-sync. r? `@ghost`
2025-09-20docs: improve doc of some methods w/ rangestk-16/+16
2025-09-20Auto merge of #146771 - Kobzol:download-ci-llvm-default-value, r=jieyouxubors-11/+4
Simplify default value of `download-ci-llvm` Just set it to true, rather than having different default values on CI and locally, and then only deny `true` on our own CI, not elsewhere. Closes: https://github.com/rust-lang/rust/issues/146768 r? `@jieyouxu`
2025-09-20Merge pull request #20707 from lnicola/bump-rustcLaurențiu Nicola-34/+32
minor: Bump rustc crates once more
2025-09-20Bump rustc crates once moreLaurențiu Nicola-34/+32
2025-09-20Auto merge of #146621 - cammeresi:peek-20250915, r=Amanieubors-44/+51
Make `PeekMut` generic over the allocator - plumb in allocator generic - additional testing Related: rust-lang/rust#122742
2025-09-19Add unstable attribute to BTreeMap-related allocator genericsSidney Cammeresi-2/+11
Although these types aren't directly constructable externally, since they're pub, I think this omission was an oversight.
2025-09-19Update cfg_if! to cfg_select!Thalia Archibald-1/+1
The macro is now builtin.
2025-09-19Fix std build for xtensaThalia Archibald-0/+1
2025-09-19Fix unsupported std::sys::threadThalia Archibald-7/+1
Fixes building std for any platform with an unsupported thread abstraction. This includes {aarch64,armv7,x86_64}-unknown-trusty and riscv32im-risc0-zkvm-elf, which explicitly include the unsupported module, and platforms with no PAL. Bug fix for PR 145177 (std: move thread into sys).
2025-09-19generate list of all variants with `target_spec_enum`Deadbeef-42/+19
This helps us avoid the hardcoded lists elsewhere.
2025-09-19Auto merge of #146797 - matthiaskrgr:rollup-xy0g8n7, r=matthiaskrgrbors-34/+37
Rollup of 5 pull requests Successful merges: - rust-lang/rust#146690 (add `[const] PartialEq` bound to `PartialOrd`) - rust-lang/rust#146776 (fixes for numerous clippy warnings) - rust-lang/rust#146777 (fix ./x readdir logic when CDPATH is set) - rust-lang/rust#146781 (mbe: Fix feature gate for `macro_derive`) - rust-lang/rust#146785 (btree: safety comments for init and new) r? `@ghost` `@rustbot` modify labels: rollup
2025-09-19fixes for numerous clippy warningsMarijn Schouten-36/+32
2025-09-19Rollup merge of #146785 - hkBst:btree-1, r=joboetMatthias Krüger-1/+7
btree: safety comments for init and new
2025-09-19Rollup merge of #146781 - joshtriplett:mbe-derive-fix-feature-gate, ↵Matthias Krüger-3/+3
r=wesleywiser mbe: Fix feature gate for `macro_derive`
2025-09-19Rollup merge of #146777 - RalfJung:x-cdpath, r=KobzolMatthias Krüger-1/+2
fix ./x readdir logic when CDPATH is set Fixes https://github.com/rust-lang/rust/issues/146769 r? ``@Kobzol``
2025-09-19Rollup merge of #146776 - hkBst:clippy-fix-12, r=jdonszelmannMatthias Krüger-28/+22
fixes for numerous clippy warnings
2025-09-19Rollup merge of #146690 - npmccallum:convo, r=tgross35Matthias Krüger-1/+3
add `[const] PartialEq` bound to `PartialOrd` This change is included for discussion purposes. The PartialOrd bound on PartialEq is not strictly necessary. It is, rather, logical: anything which is orderable should by definition have equality. Is the same true for constness? Should every type which is const orderable also have const equality?
2025-09-19naked_asm: emit a label starting with `func_end`Folkert de Vries-0/+7
The `cargo asm` tool pattern matches on such labels to figure out where functions end: normal functions generated by LLVM always do have such a label. We don't guarantee that naked functions emit such a label, but having `cargo asm` work is convenient
2025-09-19Auto merge of #146700 - Zalathar:quoted-args, r=nikicbors-49/+92
cg_llvm: Move target machine command-line quoting from C++ to Rust When this code was introduced in rust-lang/rust#130446 and rust-lang/rust#131805, it was complicated by the need to maintain compatibility with earlier versions of LLVM. Now that LLVM 20 is the baseline (rust-lang/rust#145071), we can do all of the quoting in pure Rust code, and pass two flat strings to LLVM to be used as-is. --- In this PR, my priority has been to preserve the existing behaviour as much as possible, without worrying too much about what the behaviour *should* be. (Though I did avoid a leading space before the first argument.)
2025-09-19Simplify default value of `download-ci-llvm`Jakub Beránek-11/+4
2025-09-19btree: safety comments for init and newMarijn Schouten-1/+7