about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-03-22Auto merge of #138830 - matthiaskrgr:rollup-gaxgfwl, r=matthiaskrgrbors-1612/+1845
Rollup of 7 pull requests Successful merges: - #138410 (Couple mir building cleanups) - #138490 (Forward `stream_position` in `Arc<File>` as well) - #138535 (Cleanup `LangString::parse`) - #138536 (stable_mir: Add `MutMirVisitor`) - #138673 (Fix build failure on Trusty) - #138750 (Make `crate_hash` not iterate over `hir_crate` owners anymore) - #138763 (jsondocck: Replace `jsonpath_lib` with `jsonpath-rust`) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-22Rollup merge of #138763 - aDotInTheVoid:two-years-later, r=GuillaumeGomezMatthias Krüger-1192/+1259
jsondocck: Replace `jsonpath_lib` with `jsonpath-rust` The current jsonpath implementation we use isn't spec-compliant, and is buggy. See https://github.com/freestrings/jsonpath/issues/91 To solve it, it's replaced with https://github.com/besok/jsonpath-rust. This is spec-compiant, and doesn't have a really awkward bug we need to always dance around. Unfortunately, this requires rewriting almost every test, as the behaviour of `[?(```@`,``` which is *extremely* common was changed. (But the new behaviour makes way more sense, and isn't buggy with tripply nested selectors) Unblocks #110406. Makes #100515 much easier as we don't need to explain the broken JSONPath implementation Best reviewed commit-by-commit. The first does the replacement. The next two rewrite the test-suite mechanically. The last rewrites the test-suite by hand. r? ```@GuillaumeGomez```
2025-03-22Rollup merge of #138750 - oli-obk:decouple-hir-queries, r=fee1-deadMatthias Krüger-6/+5
Make `crate_hash` not iterate over `hir_crate` owners anymore cc https://github.com/rust-lang/rust/issues/95004 One more direct usage of hir::Crate removed
2025-03-22Rollup merge of #138673 - taiki-e:trusty-fix, r=NoratriebMatthias Krüger-1/+1
Fix build failure on Trusty This target is currently broken due to update to 2024 editon. ```console $ cargo new --lib repro $ cd repro $ cargo check -Z build-std=std --target aarch64-unknown-trusty Compiling std v0.0.0 ($HOME/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/library/std) error: extern blocks must be unsafe --> $HOME/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/random/trusty.rs:1:1 | 1 | / extern "C" { 2 | | fn trusty_rng_secure_rand(randomBuffer: *mut core::ffi::c_void, randomBufferLen: libc::size_t); 3 | | } | |_^ error: could not compile `std` (lib) due to 1 previous error ``` cc ```@randomPoison``` ```@ahomescu``` ([target maintainers](https://doc.rust-lang.org/nightly/rustc/platform-support/trusty.html#target-maintainers))
2025-03-22Rollup merge of #138536 - makai410:mut-mir-visitor, r=celinvalMatthias Krüger-333/+508
stable_mir: Add `MutMirVisitor` Resolves: [rust-lang/project-stable-mir#81](https://github.com/rust-lang/project-stable-mir/issues/81). I am unsure if we should add a `MutableBody` like Kani did. Currently, I use `&mut Body` in `MutMirVisitor::visit_body()`. r? ``````@celinval``````
2025-03-22Rollup merge of #138535 - yotamofek:pr/rustdoc/lang-string-parse-cleanup, ↵Matthias Krüger-44/+41
r=notriddle Cleanup `LangString::parse` Flatten some `if`s into match patterns Use `str::strip_prefix` instead of `starts_with`+indexing Avoid redundant tests for `extra.is_some()`
2025-03-22Rollup merge of #138490 - tbu-:pr_arc_file_pos, r=NoratriebMatthias Krüger-0/+3
Forward `stream_position` in `Arc<File>` as well It was missed in #137165.
2025-03-22Rollup merge of #138410 - bjorn3:misc_cleanups, r=compiler-errorsMatthias Krüger-36/+28
Couple mir building cleanups
2025-03-22Auto merge of #136974 - m-ou-se:fmt-options-64-bit, r=scottmcmbors-321/+363
Reduce FormattingOptions to 64 bits This is part of https://github.com/rust-lang/rust/issues/99012 This reduces FormattingOptions from 6-7 machine words (384 bits on 64-bit platforms, 224 bits on 32-bit platforms) to just 64 bits (a single register on 64-bit platforms). Before: ```rust pub struct FormattingOptions { flags: u32, // only 6 bits used fill: char, align: Option<Alignment>, width: Option<usize>, precision: Option<usize>, } ``` After: ```rust pub struct FormattingOptions { /// Bits: /// - 0-20: fill character (21 bits, a full `char`) /// - 21: `+` flag /// - 22: `-` flag /// - 23: `#` flag /// - 24: `0` flag /// - 25: `x?` flag /// - 26: `X?` flag /// - 27: Width flag (if set, the width field below is used) /// - 28: Precision flag (if set, the precision field below is used) /// - 29-30: Alignment (0: Left, 1: Right, 2: Center, 3: Unknown) /// - 31: Always set to 1 flags: u32, /// Width if width flag above is set. Otherwise, always 0. width: u16, /// Precision if precision flag above is set. Otherwise, always 0. precision: u16, } ```
2025-03-22Auto merge of #138719 - lcnr:concrete_opaque_types-closures, r=oli-obkbors-153/+147
merge opaque types defined in nested bodies A small step towards https://github.com/rust-lang/types-team/issues/129 r? `@oli-obk`
2025-03-22Auto merge of #138808 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 14 commits in 6cf8267012570f63d6b86e85a2ae5627de52df9e..307cbfda3119f06600e43cd38283f4a746fe1f8b 2025-03-14 15:25:36 +0000 to 2025-03-20 20:00:39 +0000 - feat: Add custom completer for cargo &lt;TAB&gt; to complete aliases defined in config.toml (rust-lang/cargo#15319) - fix(build-dir): Renamed workspace-manifest-path-hash to workspace-path-hash (rust-lang/cargo#15334) - feat: vcs, color, and message format native completion (rust-lang/cargo#15322) - Fix `[env]` `relative` description in reference (rust-lang/cargo#15332) - chore: fix some typos (rust-lang/cargo#15329) - Cleanup for rustc-link-arg-cdylib (rust-lang/cargo#15326) - fix(toml): Report '&lt;target&gt;.edition' deprecation to users (rust-lang/cargo#15321) - test(build-std): address overly-matched snapshot (rust-lang/cargo#15325) - Added `build.build_dir` templating support (rust-lang/cargo#15236) - docs: make it clearer that `rust_version` is enforced during compile (rust-lang/cargo#15303) - feat: Add custom completer for cargo +&lt;TAB&gt; to complete toolchain name (rust-lang/cargo#15301) - chore: fix some typos (rust-lang/cargo#15316) - fix: deduplicate crate types in cargo rustc command (rust-lang/cargo#15314) - docs: mention wrong URLs as a cause of git authentication errors (rust-lang/cargo#15304) r? ghost
2025-03-21Update cargoWeihang Lo-0/+0
2025-03-21Auto merge of #128320 - saethlin:link-me-maybe, r=compiler-errorsbors-26/+57
Avoid no-op unlink+link dances in incr comp Incremental compilation scales quite poorly with the number of CGUs. This PR improves one reason for that. The incr comp process hard-links all the files from an old session into a new one, then it runs the backend, which may just hard-link the new session files into the output directory. Then codegen hard-links all the output files back to the new session directory. This PR (perhaps unimaginatively) fixes the silliness that ensues in the last step. The old `link_or_copy` implementation would be passed pairs of paths which are already the same inode, then it would blindly delete the destination and re-create the hard-link that it just deleted. This PR lets us skip both those operations. We don't skip the other two hard-links. `cargo +stage1 b && touch crates/core/main.rs && strace -cfw -elink,linkat,unlink,unlinkat cargo +stage1 b` before and then after on `ripgrep-13.0.0`: ``` % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 52.56 0.024950 25 978 485 unlink 34.38 0.016318 22 727 linkat 13.06 0.006200 24 249 unlinkat ------ ----------- ----------- --------- --------- ---------------- 100.00 0.047467 24 1954 485 total ``` ``` % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 42.83 0.014521 57 252 unlink 38.41 0.013021 26 486 linkat 18.77 0.006362 25 249 unlinkat ------ ----------- ----------- --------- --------- ---------------- 100.00 0.033904 34 987 total ``` This reduces the number of hard-links that are causing perf troubles, noted in https://github.com/rust-lang/rust/issues/64291 and https://github.com/rust-lang/rust/issues/137560
2025-03-21Auto merge of #138791 - matthiaskrgr:rollup-ev46cqr, r=matthiaskrgrbors-304/+457
Rollup of 9 pull requests Successful merges: - #138364 (ports the compiler test cases to new rust_intrinsic format) - #138570 (add `naked_functions_target_feature` unstable feature) - #138623 ([bootstrap] Use llvm_runtimes for compiler-rt) - #138627 (Autodiff cleanups) - #138669 (tests: accept some noise from LLVM 21 in symbols-all-mangled) - #138706 (Improve bootstrap git modified path handling) - #138709 (Update GCC submodule) - #138717 (Add an attribute that makes the spans from a macro edition 2021, and fix pin on edition 2024 with it) - #138721 (Use explicit cpu in some asm and codegen tests.) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-21Add test for Formatter flags.Mara Bos-0/+20
2025-03-21Add todo comment on using a niche type for fmt flags.Mara Bos-0/+2
2025-03-21Rollup merge of #138721 - jchecahi:tests-explicit-cpus, r=tgross35Matthias Krüger-28/+29
Use explicit cpu in some asm and codegen tests. Some tests expect to be compiled for a specific CPU or require certain target features to be present (or absent). These tests work fine with default CPUs but fail in downstream builds for RHEL and Fedora, where we use non-default CPUs such as z13 on s390x, pwr9 on ppc64le, or x86-64-v2/x86-64-v3 on x86_64. This is similar to #124597.
2025-03-21Rollup merge of #138717 - jdonszelmann:pin-macro, r=WaffleLapkinMatthias Krüger-8/+59
Add an attribute that makes the spans from a macro edition 2021, and fix pin on edition 2024 with it Fixes a regression, see issue below. This is a temporary fix, super let is the real solution. Closes #138596
2025-03-21Rollup merge of #138709 - Kobzol:update-gcc, r=GuillaumeGomezMatthias Krüger-0/+0
Update GCC submodule Includes https://github.com/rust-lang/gcc/pull/66 to use our mirrors for downloading GCC dependencies. r? ```@GuillaumeGomez```
2025-03-21Rollup merge of #138706 - Kobzol:bootstrap-git-refactor-1, r=onur-ozkanMatthias Krüger-56/+58
Improve bootstrap git modified path handling Drive-by improvements extracted out of https://github.com/rust-lang/rust/pull/138591. r? ``@onur-ozkan``
2025-03-21Rollup merge of #138669 - durin42:llvm-21-anon-func-unmangled, r=bjorn3Matthias Krüger-2/+14
tests: accept some noise from LLVM 21 in symbols-all-mangled I'm not entirely sure this is correct, but it doesn't feel obviously-wrong so I figured I'd just start by sending a PR rather than filing a bug and letting it linger. ``@rustbot`` label llvm-main
2025-03-21Rollup merge of #138627 - EnzymeAD:autodiff-cleanups, r=oli-obkMatthias Krüger-176/+209
Autodiff cleanups Splitting out some cleanups to reduce the size of my batching PR and simplify ``@haenoe`` 's [PR](https://github.com/rust-lang/rust/pull/138314). r? ``@oli-obk`` Tracking: - https://github.com/rust-lang/rust/issues/124509
2025-03-21Rollup merge of #138623 - daltenty:daltenty/fix-compiler-rt, r=KobzolMatthias Krüger-1/+4
[bootstrap] Use llvm_runtimes for compiler-rt Trying to enable `compiler-rt` via `LLVM_ENABLE_PROJECTS` is no longer a supported option in LLVM, and gives you nasty warnings: ``` Using LLVM_ENABLE_PROJECTS=compiler-rt is deprecated now, and will become a fatal error in the LLVM 21 release. Please use -DLLVM_ENABLE_RUNTIMES=compiler-rt or see the instructions at https://compiler-rt.llvm.org/ for building the runtimes. ``` try-job: aarch64-gnu-debug try-job: x86_64-gnu-debug
2025-03-21Rollup merge of #138570 - folkertdev:naked-function-target-feature-gate, ↵Matthias Krüger-8/+67
r=Amanieu add `naked_functions_target_feature` unstable feature tracking issue: https://github.com/rust-lang/rust/issues/138568 tagging https://github.com/rust-lang/rust/pull/134213 https://github.com/rust-lang/rust/issues/90957 This PR puts `#[target_feature(/* ... */)]` on `#[naked]` functions behind its own feature gate, so that naked functions can be stabilized. It turns out that supporting `target_feature` on naked functions is tricky on some targets, so we're splitting it out to not block stabilization of naked functions themselves. See the tracking issue for more information and workarounds. Note that at the time of writing, the `target_features` attribute is ignored when generating code for naked functions. r? ``@Amanieu``
2025-03-21Rollup merge of #138364 - BLANKatGITHUB:compiler, r=RalfJungMatthias Krüger-25/+17
ports the compiler test cases to new rust_intrinsic format pr is part of #132735
2025-03-21Auto merge of #138704 - Kobzol:ci-llvm-checks, r=onur-ozkanbors-62/+53
Simplify CI LLVM checks in bootstrap Extracted out of https://github.com/rust-lang/rust/pull/138591. Apart from simplifying the checks, it will make it easier to run E2E tests of bootstrap on a mostly empty directory without checking out LLVM on CI :) The commits should be mostly self-explanatory. r? `@onur-ozkan`
2025-03-21Fix test using `download-ci-llvm=true` on CIJakub Beránek-1/+1
2025-03-21Disable CI mode when checking default bootstrap profilesJakub Beránek-1/+2
2025-03-21Set `if-unchanged` as the default value for `download-ci-llvm` when we're on CI.Jakub Beránek-1/+8
2025-03-21Allow unused code in testsJakub Beránek-0/+1
To avoid working around some code being unused in tests due to it being stubbed out with `#[cfg(test)]`.
2025-03-21Remove duplicated check for LLVM modifications and disable ↵Jakub Beránek-42/+23
`download-ci-llvm=true` on CI
2025-03-21Unify LLVM invalidation path handlingJakub Beránek-17/+18
Before it was using a different set of paths in different call-sites.
2025-03-21Auto merge of #138768 - matthiaskrgr:rollup-nfu3cm3, r=matthiaskrgrbors-118/+727
Rollup of 8 pull requests Successful merges: - #137357 (Document results of non-positive logarithms) - #138650 (Optimize `io::Write::write_fmt` for constant strings) - #138694 (Fix: add ohos target notes) - #138713 (interpret memory access hooks: also pass through the Pointer used for the access) - #138724 (Check attrs: Don't try to retrieve the name of list stems) - #138743 (bootstrap: add `--ci` flag) - #138751 (Fix the "used_with_archive" test on Fuchsia) - #138754 (Handle spans of `~const`, `const` and `async` trait bounds in macro expansion) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-21Rollup merge of #138754 - oli-obk:push-vtqtnwluyxop, r=compiler-errorsMatthias Krüger-1/+22
Handle spans of `~const`, `const` and `async` trait bounds in macro expansion r? `@compiler-errors` `visit_span` is actually only used in one place (the `transcribe::Marker`), and all of this syntax is unstable, so while it would still be nice to write a test for it, I wager there's lots more interesting things in `transcribe::Marker` to write tests for. And the worst is some diagnostics being weird or incremental being not as incremental as it could be
2025-03-21Rollup merge of #138751 - Jeff-A-Martin:used-with-archive-test-fuchsia, ↵Matthias Krüger-0/+1
r=jieyouxu Fix the "used_with_archive" test on Fuchsia This change adds Fuchsia OS as a target to the cfg_attr in the pre_main_constructor external declaration. This allows the "tests/ui/attributes/used_with_archive.rs" to pass against Fuchsia.
2025-03-21Rollup merge of #138743 - onur-ozkan:override-is-ci-behaviour, r=KobzolMatthias Krüger-74/+415
bootstrap: add `--ci` flag To make bootstrap act like it's running on CI, we had to override the `GITHUB_ACTIONS` environment variable which is a hidden detail of `CiEnv::is_ci`. Now, we can use the `--ci` flag directly on bootstrap which will be documented automatically from `x --help`. This also helps us to avoid race conditions on bootstrap (overriding `GITHUB_ACTIONS` env in each test can cause that if we run the tests in parallel) tests.
2025-03-21Rollup merge of #138724 - fmease:list-stems-bear-no-name, r=nnethercoteMatthias Krüger-2/+12
Check attrs: Don't try to retrieve the name of list stems Fixes #138723. r? nnethercote or compiler
2025-03-21Rollup merge of #138713 - RalfJung:memory-hook-pointers, r=oli-obkMatthias Krüger-2/+26
interpret memory access hooks: also pass through the Pointer used for the access In some ongoing work on the Miri side, we need the absolute address that the memory access occurred at. That is non-trivial to obtain since we don't have an `ecx`. So pass through the `Pointer` used for the access, which contains the address, and which is available everywhere we are calling these hooks. r? `@oli-obk`
2025-03-21Rollup merge of #138694 - LuuuXXX:fix-platform-support-book, r=jieyouxuMatthias Krüger-3/+3
Fix: add ohos target notes
2025-03-21Rollup merge of #138650 - thaliaarchi:io-write-fmt-known, r=ibraheemdevMatthias Krüger-36/+48
Optimize `io::Write::write_fmt` for constant strings When the formatting args to `fmt::Write::write_fmt` are a statically known string, it simplifies to only calling `write_str` without a runtime branch. Do the same in `io::Write::write_fmt` with `write_all`. Also, match the convention of `fmt::Write` for the name of `args`.
2025-03-21Rollup merge of #137357 - syvb:sv/log-docs, r=tgross35Matthias Krüger-0/+200
Document results of non-positive logarithms The integer versions of logarithm functions panic on non-positive numbers. The floating point versions have different, undocumented behaviour (-inf on 0, NaN on <0). This PR documents that. try-job: aarch64-gnu
2025-03-21Auto merge of #138761 - flip1995:clippy-subtree-update, r=Manishearthbors-1149/+4616
Clippy subtree update r? `@Manishearth` Cargo.lock update is because of the `ui_test` dependency bump in Clippy.
2025-03-21Auto merge of #138760 - matthiaskrgr:rollup-2edtg2h, r=matthiaskrgrbors-0/+0
Rollup of 8 pull requests Successful merges: - #138435 (Add support for postfix yield expressions) - #138685 (Use `Option<Ident>` for lowered param names.) - #138700 (Suggest `-Whelp` when pass `--print lints` to rustc) - #138727 (Do not rely on `type_var_origin` in `OrphanCheckErr::NonLocalInputType`) - #138729 (Clean up `FnCtxt::resolve_coroutine_interiors`) - #138731 (coverage: Add LLVM plumbing for expansion regions) - #138732 (Use `def_path_str` for def id arg in `UnsupportedOpInfo`) - #138735 (Remove `llvm` and `llvms` triagebot ping aliases for `icebreakers-llvm` ping group) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-21tests/rustdoc-json: change assertions to use RFC 9535 jsonpathAlona Enraght-Moony-25/+25
2025-03-21tests/rustdoc-json: replace `$.paths[*][?` with `$.paths[?`Alona Enraght-Moony-6/+6
This fixes all 3 of these tests. Done automatically in VSCode.
2025-03-21tests/rustdoc-json: replace `$.index[*][?` with `$.index[?`Alona Enraght-Moony-1155/+1155
Done automatically with VSCode.
2025-03-21jsondocck: Replace `jsonpath_lib` with `jsonpath-rust`Alona Enraght-Moony-10/+77
2025-03-20Auto merge of #138747 - matthiaskrgr:rollup-68x44rw, r=matthiaskrgrbors-240/+499
Rollup of 8 pull requests Successful merges: - #138435 (Add support for postfix yield expressions) - #138685 (Use `Option<Ident>` for lowered param names.) - #138700 (Suggest `-Whelp` when pass `--print lints` to rustc) - #138727 (Do not rely on `type_var_origin` in `OrphanCheckErr::NonLocalInputType`) - #138729 (Clean up `FnCtxt::resolve_coroutine_interiors`) - #138731 (coverage: Add LLVM plumbing for expansion regions) - #138732 (Use `def_path_str` for def id arg in `UnsupportedOpInfo`) - #138735 (Remove `llvm` and `llvms` triagebot ping aliases for `icebreakers-llvm` ping group) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-20Update Cargo.lockPhilipp Krones-6/+6
2025-03-20Merge commit '1e5237f4a56ae958af7e5824343eacf737b67083' into ↵Philipp Krones-1144/+4611
clippy-subtree-update