about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-04-18Auto merge of #139997 - matthiaskrgr:rollup-a1fe5zg, r=matthiaskrgrbors-97/+86
Rollup of 6 pull requests Successful merges: - #137881 (Add `copy_within` to `IndexSlice`) - #138599 (avoid overflow when generating debuginfo for expanding recursive types) - #139934 (Update `compiler-builtins` to 0.1.155) - #139976 (run-make: drop `os_pipe` workaround now that `anonymous_pipe` is stable on beta) - #139989 (tests: adjust 101082 test for LLVM 21 fix) - #139991 (remove stray file) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-18Rollup merge of #139991 - tshepang:stray, r=KobzolMatthias Krüger-0/+0
remove stray file
2025-04-18Rollup merge of #139989 - durin42:llvm-21-issue-101082, r=cuviperMatthias Krüger-10/+2
tests: adjust 101082 test for LLVM 21 fix Fixes #139987.
2025-04-18Rollup merge of #139976 - jieyouxu:plumbing, r=KobzolMatthias Krüger-21/+2
run-make: drop `os_pipe` workaround now that `anonymous_pipe` is stable on beta Follow-up to #137537 where I had to include a temporary dep on `os_pipe` before `anonymous_pipe` was stabilized. Now that `anonymous_pipe` is stable on beta, we can get rid of this workaround. Closes #137532. (Final cleanup item) r? `@Kobzol`
2025-04-18Rollup merge of #139934 - tgross35:update-builtins, r=tgross35Matthias Krüger-4/+4
Update `compiler-builtins` to 0.1.155 Includes the following changes: * Replace `#[naked]` with `#[unsafe(naked)]` [1] [2] * Replace `bl!` with `asm_sym` [3] [1]: https://github.com/rust-lang/compiler-builtins/pull/817 [2]: https://github.com/rust-lang/compiler-builtins/pull/821 [3]: https://github.com/rust-lang/compiler-builtins/pull/820 try-job: armhf-gnu try-job: aarch64-apple try-job: dist-apple-various
2025-04-18Rollup merge of #138599 - adwinwhite:recursive-overflow, r=wesleywiserMatthias Krüger-61/+66
avoid overflow when generating debuginfo for expanding recursive types Fixes #135093 Fixes #121538 Fixes #107362 Fixes #100618 Fixes #115994 The overflow happens because expanding recursive types keep creating new nested types when recurring into sub fields. I fixed that by returning an empty stub node when expanding recursion is detected.
2025-04-18Rollup merge of #137881 - Jarcho:index_slice_ex, r=wesleywiserMatthias Krüger-1/+12
Add `copy_within` to `IndexSlice`
2025-04-17Auto merge of #139992 - matthiaskrgr:rollup-ak3uibu, r=matthiaskrgrbors-141/+387
Rollup of 8 pull requests Successful merges: - #139351 (Autodiff batching2) - #139483 (f*::NAN: guarantee that this is a quiet NaN) - #139498 (Ignore zero-sized types in wasm future-compat warning) - #139967 (Introduce and use specialized `//@ ignore-auxiliary` for test support files instead of using `//@ ignore-test`) - #139969 (update libc) - #139971 (Make C string merging test work on MIPS) - #139974 (Change `InterpCx::instantiate*` function visibility to pub) - #139977 (Fix drop handling in `hint::select_unpredictable`) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-17Rollup merge of #139977 - Amanieu:select_unpredictable_drop, r=RalfJungMatthias Krüger-9/+48
Fix drop handling in `hint::select_unpredictable` This intrinsic doesn't drop the value that is not selected so this is manually done in the public function that wraps the intrinsic.
2025-04-17Rollup merge of #139974 - Patrick-6:change-visibility, r=RalfJungMatthias Krüger-4/+2
Change `InterpCx::instantiate*` function visibility to pub For some ongoing work in Miri we need to be able to access `instantiate_from_current_frame_and_normalize_erasing_regions` and `instantiate_from_frame_and_normalize_erasing_regions` on `InterpCx`. r? `@RalfJung`
2025-04-17Rollup merge of #139971 - LukasWoodtli:gardena/lw/fix-cstring-merging-test, ↵Matthias Krüger-3/+5
r=wesleywiser Make C string merging test work on MIPS Assembly for MIPS uses, by convention, a different prefix for local anonymous variables.
2025-04-17Rollup merge of #139969 - psumbera:libc-rust-analyzer, r=lnicolaMatthias Krüger-4/+4
update libc This is needed for https://github.com/rust-lang/rust/pull/138699#discussion_r2048603474
2025-04-17Rollup merge of #139967 - jieyouxu:auxiliary, r=wesleywiserMatthias Krüger-60/+56
Introduce and use specialized `//@ ignore-auxiliary` for test support files instead of using `//@ ignore-test` ### Summary Add a semantically meaningful directive for ignoring test *auxiliary* files. This is for auxiliary files that *participate* in actual tests but should not be built by `compiletest` (i.e. these files are involved through `mod xxx;` or `include!()` or `#[path = "xxx"]`, etc.). ### Motivation A specialized directive like `//@ ignore-auxiliary` makes it way easier to audit disabled tests via `//@ ignore-test`. - These support files cannot use the canonical `auxiliary/` dir because they participate in module resolution or are included, or their relative paths can be important for test intention otherwise. Follow-up to: - #139705 - #139783 - #139740 See also discussions in: - [#t-compiler > Directive name for non-test aux files?](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Directive.20name.20for.20non-test.20aux.20files.3F/with/512773817) - [#t-compiler > Handling disabled &#96;//@ ignore-test&#96; tests](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Handling.20disabled.20.60.2F.2F.40.20ignore-test.60.20tests/with/512005974) - [#t-compiler/meetings > &#91;steering&#93; 2025-04-11 Dealing with disabled tests](https://rust-lang.zulipchat.com/#narrow/channel/238009-t-compiler.2Fmeetings/topic/.5Bsteering.5D.202025-04-11.20Dealing.20with.20disabled.20tests/with/511717981) ### Remarks on remaining unconditionally disabled tests under `tests/` After this PR, against commit 79a272c6402, only **14** remaining test files are disabled through `//@ ignore-test`: <details> <summary>Remaining `//@ ignore-test` files under `tests/`</summary> ``` tests/debuginfo/drop-locations.rs 4://@ ignore-test (broken, see #128971) tests/rustdoc/macro-document-private-duplicate.rs 1://@ ignore-test (fails spuriously, see issue #89228) tests/rustdoc/inline_cross/assoc-const-equality.rs 3://@ ignore-test (FIXME: #125092) tests/ui/match/issue-27021.rs 7://@ ignore-test (#54987) tests/ui/match/issue-26996.rs 7://@ ignore-test (#54987) tests/ui/issues/issue-49298.rs 9://@ ignore-test (#54987) tests/ui/issues/issue-59756.rs 2://@ ignore-test (rustfix needs multiple suggestions) tests/ui/precondition-checks/write.rs 5://@ ignore-test (unimplemented) tests/ui/precondition-checks/read.rs 5://@ ignore-test (unimplemented) tests/ui/precondition-checks/write_bytes.rs 5://@ ignore-test (unimplemented) tests/ui/explicit-tail-calls/drop-order.rs 2://@ ignore-test: tail calls are not implemented in rustc_codegen_ssa yet, so this causes 🧊 tests/ui/panics/panic-short-backtrace-windows-x86_64.rs 3://@ ignore-test (#92000) tests/ui/json/json-bom-plus-crlf-multifile-aux.rs 3://@ ignore-test Not a test. Used by other tests tests/ui/traits/next-solver/object-soundness-requires-generalization.rs 2://@ ignore-test (see #114196) ``` </details> Of these, most are either **unimplemented**, or **spurious**, or **known-broken**. The outstanding one is `tests/ui/json/json-bom-plus-crlf-multifile-aux.rs` which I did not want to touch in *this* PR -- that aux file has load-bearing BOM and carriage returns and byte offset matters. I think those test files that require special encoding / BOM probably are better off as `run-make` tests. See #139968 for that aux file. ### Review advice - Best reviewed commit-by-commit. - The directive name diverged from the most voted `//@ auxiliary` because I think that's easy to confuse with `//@ aux-{crate,dir}`. r? compiler
2025-04-17Rollup merge of #139498 - alexcrichton:wasm-zst-safe, r=wesleywiserMatthias Krüger-0/+11
Ignore zero-sized types in wasm future-compat warning This commit fixes a false positive of the warning triggered for #138762 and the fix is to codify that zero-sized types are "safe" in both the old and new ABIs.
2025-04-17Rollup merge of #139483 - RalfJung:nan, r=tgross35Matthias Krüger-33/+41
f*::NAN: guarantee that this is a quiet NaN I think we should guarantee that this is a quiet NaN. This then implies that programs not using `f*::from_bits` (or unsafe type conversions) are guaranteed to only work with quiet NaNs. It would be awkward if people start to write `0.0 / 0.0` instead of using the constant just because they want to get a guaranteed-quiet NaN. This is a `@rust-lang/libs-api` change. The definition of this constant currently is `0.0 / 0.0`, which is already guaranteed to be a quiet NaN. So all this does is forward that guarantee to our users.
2025-04-17Rollup merge of #139351 - EnzymeAD:autodiff-batching2, r=oli-obkMatthias Krüger-28/+220
Autodiff batching2 ~I will rebase it once my first PR landed.~ done. This autodiff batch mode is more similar to scalar autodiff, since it still only takes one shadow argument. However, that argument is supposed to be `width` times larger. r? `@oli-obk` Tracking: - https://github.com/rust-lang/rust/issues/124509
2025-04-17remove stray fileTshepang Mbambo-0/+0
2025-04-17tests: adjust 101082 test for LLVM 21 fixAugie Fackler-10/+2
Fixes #139987.
2025-04-17Update `compiler-builtins` to 0.1.155Trevor Gross-4/+4
Includes the following changes: * Replace `#[naked]` with `#[unsafe(naked)]` [1] [2] * Replace `bl!` with `asm_sym` [3] [1]: https://github.com/rust-lang/compiler-builtins/pull/817 [2]: https://github.com/rust-lang/compiler-builtins/pull/821 [3]: https://github.com/rust-lang/compiler-builtins/pull/820
2025-04-17Auto merge of #139979 - matthiaskrgr:rollup-7wu5169, r=matthiaskrgrbors-236/+597
Rollup of 9 pull requests Successful merges: - #139774 (Fix replacing supertrait aliases in `ReplaceProjectionWith`) - #139850 (Hide unstable print kinds within emit_unknown_print_request_help in stable channel) - #139870 (add retries to remove and create dir all) - #139902 (do not emit `OpaqueCast` projections with `-Znext-solver`) - #139931 (bootstrap: enable zlib for LLVM for Windows GNU) - #139935 (Upgrade to `rustc-rayon-core` 0.5.1) - #139943 (rustdoc: Support inlined cross-crate re-exported trait aliases) - #139961 (Two `rustc_const_eval` cleanups) - #139962 (opt-dist: add a flag for running tests) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-17Rollup merge of #139962 - ognevny:opt-dist-tests, r=KobzolMatthias Krüger-1/+14
opt-dist: add a flag for running tests when using `opt-dist local` user probably won't need to run tests (for various reasons). currently the only way to disable them is to set `TRY_DIST_BUILD=1`, which is not obvious and can be bad for non-CI envronments (as I guess) possibly the `run_tests` name can be confusing too... r? Kobzol try-job: dist-x86_64-linux try-job: dist-x86_64-msvc
2025-04-17Rollup merge of #139961 - nnethercote:two-rustc_const_eval-cleanups, r=oli-obkMatthias Krüger-15/+19
Two `rustc_const_eval` cleanups r? ``@lcnr``
2025-04-17Rollup merge of #139943 - fmease:rustdoc-ixcre-trait-aliases, r=GuillaumeGomezMatthias Krüger-64/+122
rustdoc: Support inlined cross-crate re-exported trait aliases Previously we'd just drop them. As a result of this PR, [`core::ptr::Thin`](https://doc.rust-lang.org/nightly/core/ptr/traitalias.Thin.html) will be admitted into the `std` façade! Also, render the where clause *after* the bounds / the `=`, not before them, as it should be. r? rustdoc
2025-04-17Rollup merge of #139935 - cuviper:rustc-rayon-core-0.5.1, r=lqdMatthias Krüger-7/+2
Upgrade to `rustc-rayon-core` 0.5.1 * [Fix a race with deadlock detection](https://github.com/rust-lang/rustc-rayon/pull/15) * [Cherry-pick changes from upstream rayon-core](https://github.com/rust-lang/rustc-rayon/pull/16) - This also removes a few dependencies from rustc's tidy list.
2025-04-17Rollup merge of #139931 - ognevny:bootstrap-llvm-zlib, r=KobzolMatthias Krüger-3/+3
bootstrap: enable zlib for LLVM for Windows GNU when compiling target LLVM with `opt-dist local` on Windows/MinGW, profraw files are being compressed with zlib, so compiling without it will make `llvm-profdata` complain about lacking of zlib support. this error is shown: `profile uses zlib compression but the profile reader was built without zlib support` example from llvm test suite: https://github.com/llvm/llvm-project/blob/76b5fcbf975547251faaeed8b567ea09d139a607/llvm/test/tools/llvm-profdata/nocompress.test#L15. implementation of step 3. from https://rust-lang.zulipchat.com/#narrow/channel/122651-general/topic/experiment.20with.20.60opt-dist.20local.60.20in.20MSYS2/near/512393873 r? Kobzol
2025-04-17Rollup merge of #139902 - lcnr:no-opaque-cast-projection, r=oli-obkMatthias Krüger-35/+52
do not emit `OpaqueCast` projections with `-Znext-solver` We normalize opaque types in their defining scope if the new solver is enabled. This means projections do not contain any 'revealable' opaque types we need to worry about. We either have a type which has been normalized by writeback or we need to normalize it anyways. r? ```@compiler-errors``` ```@oli-obk```
2025-04-17Rollup merge of #139870 - ↵Matthias Krüger-25/+72
Shourya742:2025-04-15-add-retries-to-remove_and_create_dir_all, r=jieyouxu add retries to remove and create dir all closes: #139230 r? ```@jieyouxu```
2025-04-17Rollup merge of #139850 - xizheyin:issue-138698, r=jieyouxuMatthias Krüger-12/+75
Hide unstable print kinds within emit_unknown_print_request_help in stable channel Fixes #138698 We need to get the channel from `matches`. However, since `matches`(Line 1169) is constructed after `rustc_optgroups` (Line1165, where `RustcOptGroup::value_hint` is generated, i.e. what `rustc --print print` prints), I've left it unchanged here for now. https://github.com/rust-lang/rust/blob/2da29dbe8fe23df1c7c4ab1d8740ca3c32b15526/compiler/rustc_driver_impl/src/lib.rs#L1161-L1169 There is actually a way to manually parse the `--crate-name` parameter, but I'm afraid that's an unorthodox practice. So I conservatively just modified `emit_unknown_print_request_help` to print different parameters depending on whether they are nightly or not when passing the error parameter. r? ```@jieyouxu```
2025-04-17Rollup merge of #139774 - compiler-errors:supertrait-alias, r=lcnrMatthias Krüger-74/+238
Fix replacing supertrait aliases in `ReplaceProjectionWith` The new solver has a procedure called `predicates_for_object_candidate`, which elaborates the super-bounds and item-bounds that are required to hold for a dyn trait to implement something via a built-in object impl. In that procedure, there is a folder called `ReplaceProjectionWith` which is responsible for replacing projections that reference `Self`, so that we don't encounter cycles when we then go on to normalize those projections in the process of proving these super-bounds. That folder had a few problems: Firstly, it wasn't actually checking that this was a super bound originating from `Self`. Secondly, it only accounted for a *single* projection type def id, but trait objects can have multiple (i.e. `trait Foo<A, B>: Bar<A, Assoc = A> + Bar<B, Assoc = B>`). To fix the first, it's simple enough to just add an equality check for the self ty. To fix the second, I implemented a matching step that's very similar to the `projection_may_match` check we have for upcasting, since on top of having multiple choices, we need to deal with both non-structural matches and ambiguity. This probably lacks a bit of documentation, but I think it works pretty well. Fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/171 r? lcnr
2025-04-17Fix drop handling in `hint::select_unpredictable`Amanieu d'Antras-9/+48
This intrinsic doesn't drop the value that is not selected so this is manually done in the public function that wraps the intrinsic.
2025-04-17run-make: drop `os_pipe` workaround now that `anonymous_pipe` is stable on betaJieyou Xu-21/+2
2025-04-17Ignore zero-sized types in wasm future-compat warningAlex Crichton-0/+11
This commit fixes a false positive of the warning triggered for #138762 and the fix is to codify that zero-sized types are "safe" in both the old and new ABIs.
2025-04-17Change function visibility to pubPatrick-6-4/+2
2025-04-17Make C string merging test work on MIPSLukas Woodtli-3/+5
Assembly for MIPS uses, by convention, a different prefix for local anonymous variables.
2025-04-17Hide unstable print kinds within emit_unknown_print_request_help in stable ↵xizheyin-12/+75
channel Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-04-17tests: remove unused auxiliaries under `tests/ui/directory_ownership/`Jieyou Xu-10/+0
2025-04-17tests: use `//@ ignore-auxiliary` with backlinked primary test fileJieyou Xu-49/+37
2025-04-17update libcpetr sumbera - Sun Microsystems - Prague Czech Republic-4/+4
2025-04-17Auto merge of #139949 - matthiaskrgr:rollup-pxc5tsx, r=matthiaskrgrbors-978/+1038
Rollup of 8 pull requests Successful merges: - #138632 (Stabilize `cfg_boolean_literals`) - #139416 (unstable book; document `macro_metavar_expr_concat`) - #139782 (Consistent with treating Ctor Call as Struct in liveness analysis) - #139885 (document RUSTC_BOOTSTRAP, RUSTC_OVERRIDE_VERSION_STRING, and -Z allow-features in the unstable book) - #139904 (Explicitly annotate edition for `unpretty=expanded` and `unpretty=hir` tests) - #139932 (transmutability: Refactor tests for simplicity) - #139944 (Move eager translation to a method on Diag) - #139948 (git: ignore `60600a6fa403216bfd66e04f948b1822f6450af7` for blame purposes) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-17rustc-dev-guide: document `//@ ignore-auxiliary`Jieyou Xu-0/+5
2025-04-17tests: refine disable reason for `tests/debuginfo/drop-locations.rs`Jieyou Xu-1/+3
2025-04-17compiletest: add specific `//@ ignore-auxiliary` for test support filesJieyou Xu-0/+11
This is for files that *participate* in actual tests but should not be built by `compiletest` (i.e. these files are involved through `mod xxx;` or `include!()` or `#[path = "xxx"]`, etc.). A specialized directive like `//@ ignore-auxiliary` makes it way easier to audit disabled tests via `//@ ignore-test`.
2025-04-17check OpaqueCast tests with next-solverlcnr-1/+4
2025-04-17do not emit `OpaqueCast` projections with `-Znext-solver`lcnr-34/+48
2025-04-17opt-dist: add a flag for running testsMaksim Bondarenkov-1/+14
when using `opt-dist local` user probably won't need to run tests (for various reasons). currently the only way to disable them is to set `TRY_DIST_BUILD=1`, which is not obvious and can be bad for non-CI envronments (as I guess)
2025-04-17bootstrap: enable zlib for LLVM when we compile it for profilingMaksim Bondarenkov-3/+3
when compiling target LLVM with `opt-dist local` on Windows/MinGW, profraw files are being compressed with zlib, so compiling without it will make `llvm-profdata` complain about lacking of zlib support. this error is shown: `profile uses zlib compression but the profile reader was built without zlib support` example from llvm test suite: https://github.com/llvm/llvm-project/blob/76b5fcbf975547251faaeed8b567ea09d139a607/llvm/test/tools/llvm-profdata/nocompress.test#L15
2025-04-17Auto merge of #139926 - weihanglo:update-cargo, r=weihanglobors-1/+2
Update cargo 4 commits in 864f74d4eadcaea3eeda37a2e7f4d34de233d51e..d811228b14ae2707323f37346aee3f4147e247e6 2025-04-11 20:37:27 +0000 to 2025-04-15 15:18:42 +0000 - use `zlib-rs` for gzip compression in rust code (rust-lang/cargo#15417) - test(rustfix): Use `snapbox` for snapshot testing (rust-lang/cargo#15429) - chore(deps): update rust crate gix to 0.71.0 [security] (rust-lang/cargo#15391) - Make sure search paths inside OUT_DIR precede external paths (rust-lang/cargo#15221) Also, * The license exception of sha1_smol with BSD-3-Clause is no longer needed, as `gix-*` doesn't depend on it. * Cargo depends on zlib-rs, which is distributed under Zlib license r? ghost
2025-04-17Auto merge of #139940 - matthiaskrgr:rollup-rd4d3fn, r=matthiaskrgrbors-231/+939
Rollup of 9 pull requests Successful merges: - #135340 (Add `explicit_extern_abis` Feature and Enforce Explicit ABIs) - #139440 (rustc_target: RISC-V: feature addition batch 2) - #139667 (cfi: Remove #[no_sanitize(cfi)] for extern weak functions) - #139828 (Don't require rigid alias's trait to hold) - #139854 (Improve parse errors for stray lifetimes in type position) - #139889 (Clean UI tests 3 of n) - #139894 (Fix `opt-dist` CLI flag and make it work without LLD) - #139900 (stepping into impls for normalization is unproductive) - #139915 (replace some #[rustc_intrinsic] usage with use of the libcore declarations) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-17Rollup merge of #139948 - jieyouxu:ignore-breakup-commit, r=onur-ozkanMatthias Krüger-0/+2
git: ignore `60600a6fa403216bfd66e04f948b1822f6450af7` for blame purposes 60600a6fa403216bfd66e04f948b1822f6450af7 was simply breaking up compiletest's `runtest.rs` and isn't very useful in git blame. r? `@onur-ozkan`
2025-04-17Rollup merge of #139944 - shepmaster:eager-diagnostics, r=nnethercoteMatthias Krüger-271/+98
Move eager translation to a method on Diag This will allow us to eagerly translate messages on a top-level diagnostic, such as a `LintDiagnostic`. As a bonus, we can remove the awkward closure passed into Subdiagnostic and make better use of `Into`. r? `@nnethercote`