Commit Graph

4285 Commits

Author SHA1 Message Date
Matthias Krüger 662e7599dc
Rollup merge of #141965 - Kivooeo:test-reform, r=jieyouxu
`tests/ui`: A New Order [3/N]

Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895.

r? ``@jieyouxu``
2025-06-05 12:21:33 +02:00
Matthias Krüger 1791bfb958
Rollup merge of #141962 - BoxyUwU:rdg-push, r=jieyouxu
rustc-dev-guide subtree update

r? ``@jieyouxu``
2025-06-05 12:21:32 +02:00
Matthias Krüger 7bce560b6c
Rollup merge of #141938 - ZuseZ4:offload-updates, r=Kobzol
update rust offload bootstrap

r? ``@ghost``
2025-06-05 12:21:31 +02:00
Matthias Krüger 7f12261d49
Rollup merge of #141777 - Kobzol:dist-linux-alt-no-pgo-bolt, r=marcoieni
Do not run PGO/BOLT in x64 Linux alt builds

Should unblock https://github.com/rust-lang/rust/pull/131077 and also reduce our CI costs. It seems to run ~1.5h on the x64 larger runner (free runner runs out of disk space, sadly).

Discussed [here](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Utility.20of.20the.20.60dist-x86_64-linux-alt.60.20job/with/521324477).

r? ``@marcoieni``

try-job: `dist-x86_64-linux*`
2025-06-05 12:21:30 +02:00
Matthias Krüger 65b423bfbc
Rollup merge of #140638 - RalfJung:unsafe-pinned-shared-aliased, r=workingjubilee
UnsafePinned: also include the effects of UnsafeCell

This tackles https://github.com/rust-lang/rust/issues/137750 by including an `UnsafeCell` in `UnsafePinned`, thus imbuing it with all the usual properties of interior mutability (no `noalias` nor `dereferenceable` on shared refs, special treatment by Miri's aliasing model). The soundness issue is not fixed yet because coroutine lowering does not use `UnsafePinned`.

The RFC said that `UnsafePinned` would not permit mutability on shared references, but since then, https://github.com/rust-lang/rust/issues/137750 has demonstrated that this is not tenable. In the face of those examples, I propose that we do the "obvious" thing and permit shared mutable state inside `UnsafePinned`. This seems loosely consistent with the fact that we allow going from `Pin<&mut T>` to `&T` (where the former can be aliased with other pointers that perform mutation, and hence the same goes for the latter) -- but the `as_ref` example shows that we in fact would need to add this `UnsafeCell` even if we didn't have a safe conversion to `&T`, since for the compiler and Miri, `&T` and `Pin<&T>` are basically the same type.

To make this possible, I had to remove the `Copy` and `Clone` impls for `UnsafePinned`.

Tracking issue: https://github.com/rust-lang/rust/issues/125735
Cc ``@rust-lang/lang`` ``@rust-lang/opsem``  ``@Sky9x``
I don't think this needs FCP since the type is still unstable -- we'll finally decide whether we like this approach when `UnsafePinned` is moved towards stabilization (IOW, this PR is reversible). However, I'd still like to make sure that the lang team is okay with the direction I am proposing here.
2025-06-05 12:21:29 +02:00
bors 7cc927ff7d Auto merge of #140466 - amandasystems:move-to-preprocessing-step, r=lcnr
Move placeholder handling to a proper preprocessing step

This commit breaks out the logic of placheolder rewriting into its own preprocessing step. It's one of the more boring
parts of #130227.

The only functional change from this is that the preprocessing step (where extra `r: 'static` constraints are added) is performed upstream of Polonius legacy, finally affecting Polonius. That is mostly a by-product, though.

This should be reviewable by anyone in the compiler team, so
r? rust-lang/compiler
2025-06-05 05:27:41 +00:00
Trevor Gross ec32bcf082 Merge ref 'df8102fe5f24:/library/compiler-builtins' from https://github.com/rust-lang/rust
Pull recent changes from rust-lang/rust via Josh.

Upstream ref: df8102fe5f24f28a918660b0cd918d7331c3896e
Filtered ref: 3c30d8cb1ec24e0b8a88a5cedcf6b9bece0117d7
2025-06-04 18:10:09 +00:00
许杰友 Jieyou Xu (Joe) 0cb136492c
Merge pull request #2456 from jieyouxu/pr-message-nit 2025-06-04 21:26:33 +08:00
Jieyou Xu 5404fd07ff
triagebot: avoid unnecessary line break in PR welcome message 2025-06-04 21:25:15 +08:00
onur-ozkan cda721a97f document `skip-std-check-if-no-download-rustc` in rustc-dev-guide
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-06-04 15:23:58 +03:00
许杰友 Jieyou Xu (Joe) 90529c8e54
Merge pull request #2454 from rust-lang/tshepang-expand 2025-06-04 16:46:11 +08:00
许杰友 Jieyou Xu (Joe) 8527bb5aef
Merge pull request #2455 from Rageking8/fix-incorrect-use-of-recommend-over-recommended 2025-06-04 16:44:12 +08:00
Rageking8 9120682212
Fix incorrect use of "recommend" over "recommended" 2025-06-04 16:30:02 +08:00
Tshepang Mbambo d159211d5c expand meaning of ~? diagnostic annotation 2025-06-04 00:26:47 +02:00
bors e54dd40288 Auto merge of #141229 - tgross35:builtins-josh-subtree, r=Kobzol
Merge `compiler-builtins` as a Josh subtree

Use the Josh [1] utility to add `compiler-builtins` as a subtree, which
will allow us to stop using crates.io for updates. This is intended to
help resolve some problems when unstable features change and require
code changes in `compiler-builtins`, which sometimes gets trapped in a
bootstrap cycle.

This was done using `josh-filter` built from the r24.10.04 tag:

    git fetch https://github.com/rust-lang/compiler-builtins.git 233434412fe7eced8f1ddbfeddabef1d55e493bd
    josh-filter ":prefix=library/compiler-builtins" FETCH_HEAD
    git merge --allow-unrelated FILTERED_HEAD

The HEAD in the `compiler-builtins` repository is 233434412f ("fix an if
statement that can be collapsed").

[1]: https://github.com/josh-project/josh
2025-06-03 19:52:05 +00:00
许杰友 Jieyou Xu (Joe) c51adbd12d
Merge pull request #2450 from jieyouxu/pr_message 2025-06-03 21:13:05 +08:00
bors 7eded778ab Auto merge of #136942 - Kobzol:stage0-sccache, r=jieyouxu
Use ccache for stage0 tool builds

Now after the stage0 redesign, we can actually start ccaching the build of the compiler itself. We can also cache the bootstrap tools, since these are also built with the stage0 compiler.

Stage0 compiler builds are now being cached: https://github.com/rust-lang/rust/actions/runs/15397246267#summary-43321151192 (`..bootstrap::core::build_steps::compile::Rustc	483.10s	40.41s	-91.6%`). It's not a gigantic win everywhere, but it should help. It seems to make the Linux jobs ~10 minute faster. It should be especially useful on PR builds after https://github.com/rust-lang/rust/pull/141948.

r? `@jieyouxu`

try-job: `x86_64-gnu-llvm-19*`
try-job: `x86_64-msvc*`
try-job: `x86_64-apple*`
try-job: `dist-x86_64-linux`
2025-06-03 13:09:57 +00:00
许杰友 Jieyou Xu (Joe) e058df17c8
Merge pull request #2451 from jieyouxu/rustc-pull 2025-06-03 20:19:44 +08:00
Jieyou Xu 88e0085b00 Merge from rustc 2025-06-03 20:17:50 +08:00
Jieyou Xu 91be3cb103 Preparing for merge from rustc 2025-06-03 20:16:00 +08:00
Jieyou Xu 36a33414f5
triagebot: configure PR welcome message for no auto/explicit reviewer 2025-06-03 20:05:19 +08:00
bors c911e7d730 Auto merge of #141210 - RalfJung:miri-std-doctests, r=saethlin
tools-aux ci runner: also cross-test doctests in Miri

Miri now supports running doctests across different targets. Let's use that to run the std doctests on aarch64-apple-darwin, i686-pc-windows-msvc.

try-job: x86_64-gnu-aux
2025-06-03 03:14:19 +00:00
bors c58f4830a2 Auto merge of #141750 - Noratrieb:gold-rush, r=bjorn3
Warn when gold was used as the linker

gold has been deprecated recently and is known to behave incorrectly around Rust programs, including miscompiling `#[used(linker)]`. Tell people to switch to a different linker instead.

closes rust-lang/rust#141748

r? bjorn3
2025-06-02 23:56:54 +00:00
bors 7a2568217a Auto merge of #141912 - Kobzol:rollup-wurlnsx, r=Kobzol
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#141767 (ci: use free runner for aarch64-gnu-llvm-19-1 PR job)
 - rust-lang/rust#141858 (Fix typo in `StructuralPartialEq` docs)
 - rust-lang/rust#141865 (Optionally don't steal the THIR)
 - rust-lang/rust#141874 (add f16_epsilon and f128_epsilon diagnostic items)
 - rust-lang/rust#141904 (test-float-parse: apply `cfg(not(bootstrap))`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-06-02 19:35:39 +00:00
bors 93a0856493 Auto merge of #141906 - chenyukang:rollup-k6v59ty, r=chenyukang
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#141884 (allow macro_use as first segment)
 - rust-lang/rust#141885 ([RTE-484] Update SGX maintainers)
 - rust-lang/rust#141892 (Fix false positive lint error from no_implicit_prelude attr)
 - rust-lang/rust#141894 (rustc-dev-guide subtree update)
 - rust-lang/rust#141895 (tshepang has a new email)
 - rust-lang/rust#141897 (Fix citool tests when executed locally)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-06-02 16:15:30 +00:00
Tshepang Mbambo 1d8f15e1f7
Merge pull request #2443 from smanilov/patch-21
Simplify long sentence
2025-06-02 17:30:02 +02:00
Stan Manilov c58ec21749 Simplify long sentence 2025-06-02 17:52:34 +03:00
León Orell Valerian Liehr 16525780ff
Merge pull request #2446 from fmease/fix-warning-blocks
Fix some warning blocks that contain Markdown
2025-06-02 16:27:47 +02:00
León Orell Valerian Liehr 6e608e5671
Fix some warning blocks that contain Markdown
Contents inside of an HTML element only get interpreted as Markdown
(as opposed to HTML) if its separated from the HTML tags with line breaks.
2025-06-02 16:21:59 +02:00
Tshepang Mbambo a08948f693
Merge pull request #2445 from smanilov/patch-23
Add title and toc to Async chapter
2025-06-02 16:18:44 +02:00
Tshepang Mbambo e289e75553
Merge pull request #2444 from smanilov/patch-22
Trivial: dedup word
2025-06-02 16:17:39 +02:00
Stan Manilov f362726205
Add title and toc to Async chapter
This is standard for other chapters.
2025-06-02 17:16:29 +03:00
Stan Manilov 64ccd09863
Trivial: dedup word 2025-06-02 17:02:34 +03:00
Jakub Beránek 3d1cba7bd7
Rollup merge of #141874 - usamoi:eps, r=tgross35
add f16_epsilon and f128_epsilon diagnostic items

cc https://github.com/rust-lang/rust/issues/116909
r? ``@tgross35``
2025-06-02 15:19:19 +02:00
Jakub Beránek e8e58652a4
Rollup merge of #141865 - Nadrieril:dont-steal-thir, r=oli-obk
Optionally don't steal the THIR

The THIR being stolen is a recurrent pain for authors of rustc drivers. This makes it optional, so that the `thir_body` query can still be used after analysis of the crate has completed.
2025-06-02 15:19:19 +02:00
Jakub Beránek 33a8bdd102
Rollup merge of #141858 - zacryol:spe-docs-typo, r=aDotInTheVoid
Fix typo in `StructuralPartialEq` docs

`equialent` => `equivalent`
2025-06-02 15:19:18 +02:00
Jakub Beránek 12566038b2
Rollup merge of #141767 - marcoieni:free-pr-job, r=Kobzol
ci: use free runner for aarch64-gnu-llvm-19-1 PR job
2025-06-02 15:19:17 +02:00
Yukang afd0380599
Rollup merge of #141897 - Kobzol:fix-citool-tests, r=marcoieni
Fix citool tests when executed locally

They couldn't be executed locally before due to some additional environment reads.

I also investigated the annoying rebuilds that we see on CI all the time, and they are caused by `ring`'s build script. It should be fixed in the next ring release (https://github.com/briansmith/ring/issues/2525), so we can just wait for that and then update `ring`.

r? `@marcoieni`
2025-06-02 20:57:44 +08:00
Yukang 81595902af
Rollup merge of #141895 - tshepang:new-address, r=jieyouxu
tshepang has a new email
2025-06-02 20:57:43 +08:00
Yukang 1a9be0c862
Rollup merge of #141894 - tshepang:rdg-push, r=jieyouxu
rustc-dev-guide subtree update

r? `@ghost`
2025-06-02 20:57:42 +08:00
Yukang f0267f227f
Rollup merge of #141892 - chenyukang:yukang-fix-141785-extern-crate, r=petrochenkov
Fix false positive lint error from no_implicit_prelude attr

Fixes rust-lang/rust#141785

r? `@petrochenkov`
2025-06-02 20:57:42 +08:00
Yukang d7a817beb2
Rollup merge of #141885 - raoulstrackx:raoul/rte-484-update_sgx_maintainers, r=Noratrieb
[RTE-484] Update SGX maintainers

`@mzohreva` is no longer with Fortanix. We need to change the SGX maintainers accordingly.
2025-06-02 20:57:41 +08:00
Yukang 4462c99c97
Rollup merge of #141884 - bvanjoi:issue-140255, r=petrochenkov
allow macro_use as first segment

Fixes rust-lang/rust#140255

This issue may raise a question: It's reasonable an external crate name or import target be legally named `macro_use`?
2025-06-02 20:57:41 +08:00
bors 3b3df39a7f Auto merge of #141814 - flip1995:clippy-subtree-update, r=Manishearth
Clippy subtree update

r? `@Manishearth`
2025-06-02 12:56:24 +00:00
nora d9f28732d5
Merge pull request #2440 from rust-lang/tshepang-patch-1
distracting indirection
2025-06-02 12:55:31 +02:00
Tshepang Mbambo 1f2bdb5526 use consistent title capitalization 2025-06-02 12:35:52 +02:00
Tshepang Mbambo 39300c4b70
distracting indirection 2025-06-02 12:34:19 +02:00
Tshepang Mbambo 7d5bda0d8a
Merge pull request #2439 from rust-lang/tshepang-offline-love
use a relative path, so that this also works offline
2025-06-02 12:31:25 +02:00
Tshepang Mbambo 9ad4ab9bb5 use a relative path, so that this also works offline 2025-06-02 12:30:08 +02:00
Tshepang Mbambo f3e892f57a
Merge pull request #2386 from Lysxia/fix-link
Fix link to GatherBorrows
2025-06-02 12:08:03 +02:00