about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-10-04Auto merge of #147330 - matthiaskrgr:rollup-h4jyzmv, r=matthiaskrgr autobors-910/+1329
Rollup of 11 pull requests Successful merges: - rust-lang/rust#142670 (Document fully-qualified syntax in `as`' keyword doc) - rust-lang/rust#145685 (add CloneFromCell and Cell::get_cloned) - rust-lang/rust#146330 (Bump unicode_data and printables to version 17.0.0) - rust-lang/rust#146451 (Fix atan2 inaccuracy in documentation) - rust-lang/rust#146479 (add mem::conjure_zst) - rust-lang/rust#147117 (interpret `#[used]` as `#[used(compiler)]` on illumos) - rust-lang/rust#147190 (std: `sys::net` cleanups) - rust-lang/rust#147251 (Do not assert that a change in global cache only happens when concurrent) - rust-lang/rust#147280 (Return to needs-llvm-components being info-only) - rust-lang/rust#147288 (compiletest: Make `DirectiveLine` responsible for name/value splitting) - rust-lang/rust#147315 (bless autodiff batching test) r? `@ghost` `@rustbot` modify labels: rollup
2025-10-04Rollup merge of #147315 - ZuseZ4:fix-ad-batching-test, r=jieyouxuMatthias Krüger-32/+42
bless autodiff batching test This pr blesses a broken test and unblocks running rust in the Enzyme CI: https://github.com/EnzymeAD/Enzyme/pull/2430 Enzyme is the plugin used by our std::autodiff and (future) std::batching modules, both of which are not build by default. In the near future we also hope to enable std::autodiff in the Rust CI. This test is the only one to combine two features, automatic differentiation and batching/vectorization. This combination is even more experimental than either feature on its own. I have a wip branch in which I enable more vectorization/batching and as part of that I'll think more about how to write those tests in a robust way (and likely change the interface). Until that lands, I don't care too much about what specific IR we generate here; it's just nice to track changes. r? compiler
2025-10-04Rollup merge of #147288 - Zalathar:directive, r=jieyouxuMatthias Krüger-156/+188
compiletest: Make `DirectiveLine` responsible for name/value splitting - Follow-up to rust-lang/rust#147170. --- Now that all of the directive-parsing functions have access to a `DirectiveLine`, we can move all of the ad-hoc name/value splitting code into `DirectiveLine` itself, making directive parsing simpler and more consistent. The first commit is just moving code into a submodule, so the actual changes can be seen in the subsequent commits. r? jieyouxu
2025-10-04Rollup merge of #147280 - ↵Matthias Krüger-4/+1
workingjubilee:you-can-put-your-gcc-in-my-llvm-components, r=Kobzol Return to needs-llvm-components being info-only Partially revert a535042e80a38196a58c27a8c95552546affe5dc Even with non-LLVM codegen backends, we want to allow for annotations that express dependencies to LLVM-specific parts of the test suite. This includes `//@ needs-llvm-components`, which just allows checking that LLVM is built with relevant target support before the test is run. It does not assert the test cannot work with another codegen backend.
2025-10-04Rollup merge of #147251 - jackh726:global-cache-non-concurrent-change, r=lcnrMatthias Krüger-22/+84
Do not assert that a change in global cache only happens when concurrent Fixes rust-lang/trait-system-refactor-initiative#234 I think it should just be safe to remove this assert (rather than delaying a bug). If the previous and current result are the same, I wouldn't expect issues. r? lcnr
2025-10-04Rollup merge of #147190 - joboet:sys-net-cleanup, r=hkBst,tgross35Matthias Krüger-220/+251
std: `sys::net` cleanups This PR contains three improvements to the socket-based networking implementation (aa1263e7684341a73b600eaf0bbc70067e196243 is just to add the now missing `unsafe`). Best reviewed commit-by-commit.
2025-10-04Rollup merge of #147117 - iximeow:ixi/illumos-used-attr, r=NoratriebMatthias Krüger-9/+43
interpret `#[used]` as `#[used(compiler)]` on illumos helps rust-lang/rust#146169 not be as painful: fixes the illumos regression in rust-lang/rust#140872, but `#[used(linker)]` is still erroneous on illumos generally. illumos' `ld` does not support a flag like either SHF_GNU_RETAIN or SHF_SUNW_NODISCARD, so there is no way to communicate `#[used(linker)]` for that target. Setting `USED_LINKER` to try results in LLVM setting SHF_SUNW_NODISCARD for Solaris-like targets, which is an unknown section header flag for illumos `ld` and prevents sections from being merged that otherwise would. As a motivating example, the `inventory` crate produces `#[used]` items to merge into `.init_array`. Because those items have an unknown section header flag they are not merged with the default `.init_array` with `frame_dummy`, and end up never executed. Downgrading `#[used]` to `#[used(compiler)]` on illumos keeps so-attributed items as preserved as they had been before https://github.com/rust-lang/rust/pull/140872. As was the case before that change, because rustc passes `-z ignore` to illumos `ld`, it's possible that `used` sections are GC'd at link time. https://github.com/rust-lang/rust/issues/146169 describes this unfortunate circumstance. ---- as it turns out, `tests/ui/attributes/used_with_archive.rs` had broken on `x86_64-unknown-illumos`, and this patch fixes it. the trials and tribulations of tier 2 :( r? ``@Noratrieb`` probably?
2025-10-04Rollup merge of #146479 - Qelxiros:mem_conjure_zst, r=scottmcm,tgross35Matthias Krüger-0/+80
add mem::conjure_zst Tracking issue: rust-lang/rust#95383
2025-10-04Rollup merge of #146451 - DimitriiTrater:atan2_correctness_docs, r=tgross35Matthias Krüger-16/+24
Fix atan2 inaccuracy in documentation Fixes rust-lang/rust#136275
2025-10-04Rollup merge of #146330 - Marcondiro:unicode-17, r=ManishearthMatthias Krüger-445/+465
Bump unicode_data and printables to version 17.0.0 Unicode 17 ~~is not stable yet (release planned for 2025-09-09).~~ [has been released!](https://www.unicode.org/versions/Unicode17.0.0/) Update Unicode data and printables to [Unicode 17](https://www.unicode.org/versions/Unicode17.0.0/)
2025-10-04Rollup merge of #145685 - Qelxiros:cell_get_cloned, r=programmerjake,tgross35Matthias Krüger-3/+119
add CloneFromCell and Cell::get_cloned Tracking issue: rust-lang/rust#145329
2025-10-04Rollup merge of #142670 - fpdotmonkey:doc/as-fully-qualified-syntax, ↵Matthias Krüger-3/+32
r=ibraheemdev,fmease Document fully-qualified syntax in `as`' keyword doc
2025-10-04Auto merge of #147323 - chenyukang:yukang-fix-tidy-check, r=jieyouxu HEAD masterbors-7/+6
Fix top level ui tests check in tidy I got an error when pushing code: ```console fmt check fmt: checked 6330 modified files tidy check tidy [ui_tests (tests)]: ui tests should be added under meaningful subdirectories: `/Users/yukang/rust/tests/ui/.DS_Store` tidy [ui_tests (tests)]: FAIL ``` I think it's better to use `ignore::WalkBuilder` for checking the path. r? `@jieyouxu`
2025-10-04Fix top level ui tests check in tidyyukang-7/+6
2025-10-04Auto merge of #147308 - matthiaskrgr:rollup-ov04tbi, r=matthiaskrgrbors-175/+386
Rollup of 5 pull requests Successful merges: - rust-lang/rust#147245 (only replace the intended comma in pattern suggestions) - rust-lang/rust#147269 (Add regression test for 123953) - rust-lang/rust#147277 (Extract common logic for iterating over features) - rust-lang/rust#147292 (Respect `-Z` unstable options in `rustdoc --test`) - rust-lang/rust#147300 (Add xtensa arch to object file creation) r? `@ghost` `@rustbot` modify labels: rollup
2025-10-04Auto merge of #147299 - compiler-errors:hr-norm, r=jackh726bors-13/+107
Don't normalize higher-ranked assumptions if they're not used See the comment in the code. Normalizing these assumptions may cause us to register things like new placeholder outlives obligations that cause higher-ranked lifetime errors, and this is problematic if we're not even using these assumptions in borrowck. Fixes rust-lang/rust#147244 Fixes rust-lang/rust#147285
2025-10-03update autodiff batching testManuel Drehwald-32/+42
2025-10-03interpret #[used] as #[used(compiler)] on illumosiximeow-9/+43
illumos' `ld` does not support a flag like either SHF_GNU_RETAIN or SHF_SUNW_NODISCARD, so there is no way to communicate `#[used(linker)]` for that target. Setting `USED_LINKER` to try results in LLVM setting SHF_SUNW_NODISCARD for Solaris-like targets, which is an unknown section header flag for illumos `ld` and prevents sections from being merged that otherwise would. As a motivating example, the `inventory` crate produces `#[used]` items to merge into `.init_array`. Because those items have an unknown section header flag they are not merged with the default `.init_array` with `frame_dummy`, and end up never executed. Downgrading `#[used]` to `#[used(compiler)]` on illumos keeps so-attributed items as preserved as they had been before https://github.com/rust-lang/rust/pull/140872. As was the case before that change, because rustc passes `-z ignore` to illumos `ld`, it's possible that `used` sections are GC'd at link time. https://github.com/rust-lang/rust/issues/146169 describes this unfortunate circumstance.
2025-10-03Do not assert that a change in global cache only happens when concurrentjackh726-22/+84
2025-10-03Rollup merge of #147300 - esp-rs:xtensa-meta, r=saethlinMatthias Krüger-0/+1
Add xtensa arch to object file creation Just something that was missed in the xtensa target PRs.
2025-10-03Rollup merge of #147292 - Urgau:rustdoc-test-unstable_opts, r=fmeaseMatthias Krüger-134/+213
Respect `-Z` unstable options in `rustdoc --test` This PR makes rustdoc respect `-Z` unstable options when collecting doctests (`rustdoc --test`). In the process I also realized that `--error-format` wasn't respected as well, making UI annotations impossible to write so I fixed that as well. Best reviewed commit by commit. Fixes https://github.com/rust-lang/rust/issues/147276 Fixes https://github.com/rust-lang/rust/issues/143930 r? fmease
2025-10-03Rollup merge of #147277 - fee1-dead-contrib:featiter, r=ZalatharMatthias Krüger-11/+13
Extract common logic for iterating over features Two places doing the same thing is enough to motivate me to extract this to a method :)
2025-10-03Rollup merge of #147269 - reddevilmidzy:ice-fix, r=petrochenkovMatthias Krüger-0/+80
Add regression test for 123953 close: rust-lang/rust#123953
2025-10-03Rollup merge of #147245 - ↵Matthias Krüger-30/+79
karolzwolak:only-replace-intended-bar-not-all-in-pattern, r=lcnr only replace the intended comma in pattern suggestions Only suggest to replace the intended comma, not all bars in the pattern. Fixes rust-lang/rust#143330. This continues rust-lang/rust#143331, the credit for making the fix goes to `@A4-Tacks.` I just blessed tests and added a regression test.
2025-10-03Auto merge of #147301 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo submodule 24 commits in f2932725b045d361ff5f18ba02b1409dd1f44e71..2394ea6cea8b26d717aa67eb1663a2dbf2d26078 2025-09-24 11:31:26 +0000 to 2025-10-03 14:13:01 +0000 - Recommend `package.rust-version` in the Rust version section of `reference/semver.md`. (rust-lang/cargo#15806) - fix(toml): Prevent non-script fields in Cargo scripts (rust-lang/cargo#16026) - chore(ci): unpin libc (rust-lang/cargo#16044) - chore: Update dependencies (rust-lang/cargo#16034) - Fix FileLock path tracking after rename in package operation (rust-lang/cargo#16036) - Lockfile schemas error cleanup (rust-lang/cargo#16039) - Convert a multi-part diagnostic to a report (rust-lang/cargo#16035) - fix(run): Override arg0 for cargo scripts (rust-lang/cargo#16027) - Public in private manifest errors (rust-lang/cargo#16002) - chore(deps): update actions/checkout action to v5 (rust-lang/cargo#16031) - fix: remove FIXME comment that's no longer a problem (rust-lang/cargo#16025) - Add retry for `git fetch` failures in `CARGO_NET_GIT_FETCH_WITH_CLI` path (rust-lang/cargo#16016) - Added better filesystem layout testing harness (rust-lang/cargo#15874) - Small cleanup to normalize_dependencies (rust-lang/cargo#16022) - fix: better error message for rust version incompatibility (rust-lang/cargo#16021) - fix(shell): Use a distinct style for transient status (rust-lang/cargo#16019) - chore(deps): Depend on `serde_core` in `cargo-platform` (rust-lang/cargo#15992) - Remove package-workspace from unstable doc index (rust-lang/cargo#16014) - fix(shell): Switch to annotate snippets for notes (rust-lang/cargo#15945) - docs: update changelog (rust-lang/cargo#15986) - chore(ci): add rustfmt for docs job (rust-lang/cargo#16013) - chore: bump to 0.93.0 (rust-lang/cargo#16009) - fix(config): combine key error context into one (rust-lang/cargo#16004) - test(docker): openssh requires a newer libcrypto3 (rust-lang/cargo#16010) r? ghost
2025-10-03add mem::conjure_zstJeremy Smart-0/+80
2025-10-03Update cargo submoduleWeihang Lo-0/+0
2025-10-03Add xtensa arch to object file creationScott Mabin-0/+1
2025-10-03Add regression test for `-Zcrate-attr` in `rustdoc --test`Urgau-0/+54
2025-10-03Respect `--error-format` in `rustdoc --test`Urgau-28/+52
2025-10-03Auto merge of #143613 - Enselic:panic-abort-uwtables, r=petrochenkovbors-9/+74
Fix backtraces with `-C panic=abort` on linux; emit unwind tables by default The linux backtrace unwinder relies on unwind tables to work properly, and generating and printing a backtrace is done by for example the default panic hook. Begin emitting unwind tables by default again with `-C panic=abort` (see history below) so that backtraces work. Closes https://github.com/rust-lang/rust/issues/81902 which is **regression-from-stable-to-stable** Closes https://github.com/rust-lang/rust/issues/94815 ### History Backtraces with `-C panic=abort` used to work in Rust 1.22 but broke in Rust 1.23, because in 1.23 we stopped emitting unwind tables with `-C panic=abort` (see https://github.com/rust-lang/rust/pull/45031 and https://github.com/rust-lang/rust/issues/81902#issuecomment-3046487084). In 1.45 a workaround in the form of `-C force-unwind-tables=yes` was added (see https://github.com/rust-lang/rust/pull/69984). `-C panic=abort` was added in [Rust 1.10](https://blog.rust-lang.org/2016/07/07/Rust-1.10/#what-s-in-1-10-stable) and the motivation was binary size and compile time. But given how confusing that behavior has turned out to be, it is better to make binary size optimization opt-in with `-C force-unwind-tables=no` rather than default since the current default breaks backtraces. Besides, if binary size is a primary concern, there are many other tricks that can be used that has a higher impact. # Release Note Entry Draft: ## Compatibility Notes * [Fix backtraces with `-C panic=abort` on Linux by generating unwind tables by default](https://github.com/rust-lang/rust/pull/143613). Build with `-C force-unwind-tables=no` to keep omitting unwind tables. try-job: aarch64-apple try-job: armhf-gnu try-job: aarch64-msvc-1
2025-10-03Don't normalize higher-ranked assumptions if they're not usedMichael Goulet-13/+107
2025-10-03Document fully-qualified syntax in `as`' keyword docFletcher Porter-3/+32
2025-10-03Auto merge of #142771 - dianqk:mir-stmt-debuginfo, r=cjgillotbors-581/+2798
Introduce debuginfo to statements in MIR The PR introduces support for debug information within dead statements. Currently, only the reference statement is supported, which is sufficient to fix rust-lang/rust#128081. I don't modify Stable MIR, as I don't think we need debug information when using it. This PR represents the debug information for the dead reference statement via `#dbg_value`. For example, `let _foo_b = &foo.b` becomes `#dbg_value(ptr %foo, !22, !DIExpression(DW_OP_plus_uconst, 4, DW_OP_stack_value), !26)`. You can see this here: https://rust.godbolt.org/z/d43js6adv. The general principle for handling debug information is to never provide less debug information than the optimized LLVM IR. The current rules for dropping debug information in this PR are: - If the LLVM IR cannot represent a reference address, it's replaced with poison or simply dropped. For example, see: https://rust.godbolt.org/z/shGqPec8W. I'm using poison in all such cases now. - All debuginfos is dropped when merging multiple successor BBs. An example is available here: https://rust.godbolt.org/z/TE1q3Wq6M. I doesn't drop debuginfos in `MatchBranchSimplification`, because LLVM also pick one branch for it.
2025-10-03Respect `-Z` unstable options in `rustdoc --test`Urgau-119/+120
2025-10-03Auto merge of #145898 - lolbinarycat:rustdoc-search-trait-parent, ↵bors-96/+275
r=GuillaumeGomez,notriddle If a trait item appears in rustdoc search, hide the corrosponding impl items fixes rust-lang/rust#138251 cc `@notriddle`
2025-10-03Use new `DirectiveLine` features in directive parsingZalathar-89/+73
2025-10-03Allow easy extraction of name/value from a `DirectiveLine`Zalathar-5/+50
2025-10-03Move `DirectiveLine` into its own submoduleZalathar-66/+69
2025-10-03Auto merge of #147282 - Zalathar:rollup-7wz3k9r, r=Zalatharbors-425/+839
Rollup of 6 pull requests Successful merges: - rust-lang/rust#141839 (make rust-analyzer use a dedicated build directory) - rust-lang/rust#146166 (Implement range support in `//@ edition`) - rust-lang/rust#147259 (cg_llvm: Use helper methods for all calls to `LLVMMDNodeInContext2`) - rust-lang/rust#147263 (Disable triagebot auto stable-regression compiler backport nominations pending redesign) - rust-lang/rust#147268 (add arm-maintainers to various targets) - rust-lang/rust#147270 (Move doc_cfg-specific code into `cfg.rs`) r? `@ghost` `@rustbot` modify labels: rollup
2025-10-03debuginfo: Use `LocalRef` to simplify reference debuginfosdianqk-157/+318
If the `LocalRef` is `LocalRef::Place`, we can refer to it directly, because the local of place is an indirect pointer. Such a statement is `_1 = &(_2.1)`. If the `LocalRef` is `LocalRef::Operand`, the `OperandRef` should provide the pointer of the reference. Such a statement is `_1 = &((*_2).1)`. But there is a special case that hasn't been handled, scalar pairs like `(&[i32; 16], i32)`.
2025-10-03Rollup merge of #147270 - GuillaumeGomez:move-cfg-code, r=lolbinarycatStuart Cook-264/+268
Move doc_cfg-specific code into `cfg.rs` Follow-up of https://github.com/rust-lang/rust/pull/138907. r? lolbinarycat
2025-10-03Rollup merge of #147268 - davidtwco:add-arm-maintainers-to-targets, r=lqdStuart Cook-17/+152
add arm-maintainers to various targets Add the ``@rust-lang/arm-maintainers`` team as maintainers to the following targets: - `aarch64-unknown-linux-gnu` - `aarch64-unknown-none`/`aarch64-unknown-none-softfloat` - `aarch64-unknown-uefi` - `armv7-unknown-linux-gnueabi`/`armv7-unknown-linux-gnueabihf` - `armv7a-none-eabi`/`armv7a-none-eabihf` - `armv7r-none-eabi`/`armv7r-none-abihf` - `armv8r-none-eabihf` - `thumbv7em-none-eabi`/`thumbv7em-none-eabihf` - `thumbv7m-none-eabi` - `thumbv8m.base-none-eabi` - `thumbv8m.main-none-eabi`/`thumbv8m.main-none-eabihf` cc `@thejpster`
2025-10-03Rollup merge of #147263 - jieyouxu:disable-auto-backport-nominations, ↵Stuart Cook-4/+0
r=apiraino,Urgau Disable triagebot auto stable-regression compiler backport nominations pending redesign Current auto compiler stable-regression backport nominations seem to be too aggressive, and seems to unfortunately lower signal-to-noise ratio of the compiler backport channel. So this PR disables the triagebot compiler auto stable-regression backport nominations pending a redesign. Beta-regression auto backport nominations are not modified, we might want to gather some more experience with it. No prejudice against re-enabling them if the nominations include a bit more context on _why_ it's automatically nominated and _which_ regression(s) are being addressed. Or as proposed, it could also simply become a reminder-to-nominate _comment_. cf. [#t-compiler/backports > #146919: stable-nominated @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/474880-t-compiler.2Fbackports/topic/.23146919.3A.20stable-nominated/near/540979327) > I like the idea of rustbot just posting a message that suggests adding the label. That seems like a good compromise between avoiding forgotten nominations and avoiding spurious nominations. In any case, this was very much worth experimenting! r? `@apiraino` (or triagebot)
2025-10-03Rollup merge of #147259 - Zalathar:node-in-context, r=nnethercoteStuart Cook-111/+93
cg_llvm: Use helper methods for all calls to `LLVMMDNodeInContext2` Originally I was only planning on extracting an `md_node_in_context` method, but then I noticed that all callers of `LLVMMDNodeInContext2` could be covered by a small number of additional helper methods. There should be no change in compiler output.
2025-10-03Rollup merge of #146166 - ferrocene:pvdrz/edition-range, r=fmease,jieyouxuStuart Cook-14/+284
Implement range support in `//@ edition` First step to solve https://github.com/rust-lang/rust/issues/145364
2025-10-03Rollup merge of #141839 - tshepang:ease-lsp-use, r=Mark-Simulacrum,fee1-deadStuart Cook-15/+42
make rust-analyzer use a dedicated build directory inspired by https://github.com/rust-lang/rust/pull/132794
2025-10-02Extract common logic for iterating over featuresDeadbeef-11/+13
Two places doing the same thing is enough to motivate me to extract this to a method :)
2025-10-02Auto merge of #147231 - CrooseGit:dev/reucru01/extend_rustc_force_inline, ↵bors-25/+346
r=saethlin Extending `#[rustc_force_inline]` to be applicable to inherent methods `#[rustc_force_inline]` is an internal-only attribute similar to `#[inline(always)]` but which emits an error if inlining cannot occur. rustc_force_inline uses the MIR inliner to do this and has limitations on where it can be applied to ensure that an error is always emitted if inlining can't happen (e.g. it can't be applied to trait methods because calls to those can't always be resolved). `#[rustc_force_inline]` is motivated by AArch64 pointer authentication intrinsics where it is vital for the security properties of these intrinsics that they do not exist in standalone functions that could be used as gadgets in an exploit (if they could, then you could sign whatever pointers you want, for example, which is bad, but if you force inlining, then you can't jump to a reusable function containing only these instructions). Since its initial implementation, `#[rustc_force_inline]` could only be applied to free functions. This can be relaxed to also allow inherent methods while still preserving the desired properties. In a work-in-progress patch for manual pointer authentication intrinsics, it is useful to introduce types with inherent methods that would need to be force inlined. r? `@saethlin`
2025-10-02Return to needs-llvm-components being info-onlyJubilee Young-4/+1
Partially revert a535042e80a38196a58c27a8c95552546affe5dc Even with non-LLVM codegen backends, we want to allow for annotations that express dependencies to LLVM-specific parts of the test suite. This includes `//@ needs-llvm-components`, which just allows checking that LLVM is built with relevant target support before the test is run. It does not assert the test cannot work with another codegen backend.