about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-09-21add an API in ConfigBuilder to point to config file for toml parsingbit-aloo-0/+8
2025-09-21walk up the ancestorsbit-aloo-6/+7
2025-09-21make cargo test work for bootstrap self testbit-aloo-73/+17
2025-09-21Changes to uitests for macro_export portJonathan Brouwer-277/+417
Co-authored-by: Anne Stijns <anstijns@gmail.com>
2025-09-21Port #[macro_export] to the new attribute parsing infrastructureJonathan Brouwer-93/+177
Co-authored-by: Anne Stijns <anstijns@gmail.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-21btree InternalNode::new safety commentsMarijn Schouten-2/+3
2025-09-21Add self-profile events for target-machine creationZalathar-0/+10
These code paths are surprisingly hot in the `large-workspace` benchmark; it would be handy to see some detailed timings and execution counts.
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-21Merge pull request #20714 from A4-Tacks/rm-dbg-trailing-commaShoyu Vanilla (Flint)-1/+16
Fix not applicable on trailing comma for remove_dbg
2025-09-21Support ctr and lr as clobber-only registers in PowerPC inline assemblyTaiki Endo-189/+572
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-21fix a crash in rustdoc merge finalize without input fileIris Shi-2/+4
2025-09-21Consider errors in MIR as impossible predicates.Camille Gillot-61/+201
2025-09-21Fix not applicable on trailing comma for remove_dbgA4-Tacks-1/+16
`remove_dbg` not applicable for whitespaces after trailing comma Example --- ```rust fn foo() { dbg!( bar(), ); } ``` **Before this PR**: Assist not applicable **After this PR**: ```rust fn foo() { bar(); } ```
2025-09-21Update list of good combinations (inc. beta + nightly)Igor S. Gerasimov-2/+5
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-20allow take union field addresses in safe rustKivooeo-1/+60
2025-09-20Make term_patch_map sparse.Camille Gillot-14/+18
2025-09-20Merge pull request #20706 from A4-Tacks/stdx-replace-inplaceShoyu Vanilla (Flint)-3/+41
Fix to implements in-place stdx::replace
2025-09-20Add some test for stdx::replaceA4-Tacks-0/+30
2025-09-20Merge pull request #20661 from A4-Tacks/suggest-if-bodyShoyu Vanilla (Flint)-8/+82
Fix IfExpr branches suggests
2025-09-20Merge pull request #4598 from rust-lang/rustup-2025-09-20Ralf Jung-17764/+15841
Automatic Rustup
2025-09-20Fix to implements in-place stdx::replaceA4-Tacks-3/+11
2025-09-20Fix IfExpr then branch suggestA4-Tacks-8/+82
- And add logic operation suggest Example --- In the old implementation, it always suggested conditions, this is a lot of noise, e.g `contract_checks()~(use std::intrinsics::contract_checks) const fn() -> bool` ```rust fn foo() { if true { c$0 } } ```
2025-09-20Merge pull request #20710 from A4-Tacks/unused-var-shorthandShoyu Vanilla (Flint)-11/+57
Fix unused_variables fixes shorthand record field
2025-09-20Merge pull request #20709 from ↵Shoyu Vanilla (Flint)-2/+48
A4-Tacks/destruct-panic-on-not-add-deref-and-paren Fix panic `!self.data().mutable` for destructure_struct_binding
2025-09-20Merge pull request #20686 from A4-Tacks/gen-default-not-apply-selectedShoyu Vanilla (Flint)-0/+46
Fix selected applicable generate_default_from_enum_variant
2025-09-20Merge pull request #20689 from ShoyuVanilla/accurate-flycheckDavid Barsky-43/+213
fix: Make flycheck clearing dependency-aware
2025-09-20Fix selected multi variants applicable generate_default_from_enum_variantA4-Tacks-0/+46
2025-09-20Merge pull request #20688 from ↵Shoyu Vanilla (Flint)-0/+18
A4-Tacks/fix-applicable-after-l-curly-replace-is-method-with-if-let Fix applicable after l_curly for replace_is_method_with_if_let_method