Skip to content

Rustc pull update #2251

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 57 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
912575e
Update documentation
Kobzol Feb 11, 2025
940f431
Auto merge of #136921 - Kobzol:gcc-build, r=onur-ozkan
bors Feb 26, 2025
0d3b748
Auto merge of #137036 - jieyouxu:drivers-license, r=Kobzol
bors Feb 26, 2025
fb3634e
Auto merge of #137354 - FractalFir:intern_with_cap, r=FractalFir
bors Feb 26, 2025
ade1261
Rollup merge of #134585 - cyrgani:uninit_array, r=Amanieu
fmease Feb 26, 2025
fde88fb
Rollup merge of #136187 - hkBst:patch-27, r=workingjubilee
fmease Feb 26, 2025
f41ac06
Rollup merge of #137631 - TaKO8Ki:issue-137508, r=compiler-errors
fmease Feb 26, 2025
99bcfbc
Rollup merge of #137642 - BoxyUwU:rdg-push, r=Kobzol
fmease Feb 26, 2025
4a50ef7
Rollup merge of #137660 - Kobzol:gcc-update, r=GuillaumeGomez
fmease Feb 26, 2025
df0d5f4
Rollup merge of #137670 - RalfJung:llvm-commit-logic-revert, r=Kobzol
fmease Feb 26, 2025
4b7bbd7
Rollup merge of #137671 - meithecatte:discoverable-dump-mir, r=Nadrieril
fmease Feb 26, 2025
8044303
Support raw-dylib link kind on ELF
Noratrieb Jan 18, 2025
4aa84a5
Auto merge of #137688 - fmease:rollup-gbeuj9j, r=fmease
bors Feb 26, 2025
0a9e5c4
Auto merge of #132295 - the8472:remove-randomize-exclusion1, r=onur-o…
bors Feb 27, 2025
9be4329
Auto merge of #137669 - DianQK:fn-atts-virtual, r=saethlin
bors Feb 28, 2025
a2f0e0b
Auto merge of #133250 - DianQK:embed-bitcode-pgo, r=nikic
bors Mar 1, 2025
6a61f6f
rustc-dev-guide: remove mentions of legacy `Makefile` run-make infra
jieyouxu Feb 5, 2025
a522bd0
Auto merge of #136864 - Kobzol:citool, r=marcoieni
bors Mar 2, 2025
fe86e77
Auto merge of #137425 - yotamofek:pr/rustdoc/return-impl-display-redu…
bors Mar 2, 2025
8b72496
Auto merge of #137661 - nikic:llvm20-rc3, r=cuviper
bors Mar 2, 2025
ed06554
Auto merge of #137704 - nnethercote:opt-empty-prov-range-checks, r=ol…
bors Mar 2, 2025
4801165
Remove some unnecessary aliases from `rustc_data_structures::sync`
Zalathar Mar 3, 2025
cf3f317
Rollup merge of #137852 - moulins:layout-nonarray-simd-deadcode, r=wo…
matthiaskrgr Mar 3, 2025
75dbb05
Rollup merge of #137882 - onur-ozkan:remove-extra-compiler-stage, r=K…
matthiaskrgr Mar 3, 2025
3d5f177
Rollup merge of #137894 - compiler-errors:no-scalar-pair-opt, r=oli-obk
matthiaskrgr Mar 3, 2025
f7bad03
Rollup merge of #137922 - Zalathar:sharded, r=SparrowLii
matthiaskrgr Mar 3, 2025
3089471
Rollup merge of #137939 - speedy-lex:shl-fix, r=Noratrieb
matthiaskrgr Mar 3, 2025
885d490
Rollup merge of #137946 - ehuss:ci-docker-readme, r=Kobzol
matthiaskrgr Mar 3, 2025
9512e5d
Rollup merge of #137955 - Noratrieb:rustdoc-json-long-lines, r=aDotIn…
matthiaskrgr Mar 3, 2025
1ece9eb
Rollup merge of #137958 - aDotInTheVoid:aDotInTheVoid-patch-2, r=jiey…
matthiaskrgr Mar 3, 2025
cc4c680
Auto merge of #137959 - matthiaskrgr:rollup-62vjvwr, r=matthiaskrgr
bors Mar 4, 2025
cd733e5
Auto merge of #135695 - Noratrieb:elf-raw-dylib, r=bjorn3
bors Mar 4, 2025
724c83e
Auto merge of #135186 - camelid:const-path-multi, r=BoxyUwU
bors Mar 4, 2025
63aab5f
Rollup merge of #134063 - tgross35:dec2flt-refactoring, r=Noratrieb
jieyouxu Mar 5, 2025
a1c5c49
Rollup merge of #136581 - jieyouxu:makefile-be-gone, r=Kobzol
jieyouxu Mar 5, 2025
6393814
Rollup merge of #136662 - thaliaarchi:formatter-pad-char-count, r=m-o…
jieyouxu Mar 5, 2025
9371ec7
Rollup merge of #136764 - traviscross:TC/make-ptr_cast_add_auto_to_ob…
jieyouxu Mar 5, 2025
75a7b7e
Rollup merge of #136798 - pcorwin:master, r=tgross35
jieyouxu Mar 5, 2025
b210d96
Rollup merge of #136865 - jieyouxu:long-type-path-compare-mode, r=lqd
jieyouxu Mar 5, 2025
f6e43bf
Rollup merge of #136975 - jyn514:macos-x, r=Mark-Simulacrum
jieyouxu Mar 5, 2025
2a985fe
Rollup merge of #136977 - Kobzol:citool-datadog, r=marcoieni
jieyouxu Mar 5, 2025
99ec9ab
Rollup merge of #137240 - jieyouxu:remove_dir_all, r=Mark-Simulacrum
jieyouxu Mar 5, 2025
e946551
Rollup merge of #137298 - compiler-errors:mir-wf, r=lcnr
jieyouxu Mar 5, 2025
87ef415
Rollup merge of #137463 - sunshowers:illumos-posix-spawn, r=Mark-Simu…
jieyouxu Mar 5, 2025
95a3592
Rollup merge of #137477 - Ayush1325:uefi-service-binding, r=Noratrieb
jieyouxu Mar 5, 2025
ca26397
Rollup merge of #137569 - aDotInTheVoid:for-iurii, r=ibraheemdev
jieyouxu Mar 5, 2025
8eeac16
Rollup merge of #137633 - compiler-errors:no-implied-bounds-hack-unle…
jieyouxu Mar 5, 2025
c5d929d
Rollup merge of #137679 - bjorn3:coretests_improvements, r=jieyouxu,o…
jieyouxu Mar 5, 2025
03af53f
Rollup merge of #137723 - onur-ozkan:cfg-ver-description, r=pietroalb…
jieyouxu Mar 5, 2025
32b3c78
Rollup merge of #137728 - Darksonn:no-tuple-unsize, r=oli-obk
jieyouxu Mar 5, 2025
49c57bf
Rollup merge of #137731 - SparrowLii:waiter, r=nnethercote
jieyouxu Mar 5, 2025
9bc35c0
Rollup merge of #137875 - Zalathar:irrefutable, r=Nadrieril
jieyouxu Mar 5, 2025
2f1b400
Rollup merge of #138028 - workingjubilee:is-rustic-abi, r=compiler-er…
jieyouxu Mar 5, 2025
7efb58d
Auto merge of #138058 - jieyouxu:rollup-skdt0oz, r=jieyouxu
bors Mar 5, 2025
309c805
Auto merge of #137907 - compiler-errors:inline-fnonce, r=saethlin
bors Mar 5, 2025
257f03d
Preparing for merge from rustc
invalid-email-address Mar 6, 2025
96aafd0
Merge from rustc
invalid-email-address Mar 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4ecd70ddd1039a3954056c1071e40278048476fa
30f168ef811aec63124eac677e14699baa9395bd
2 changes: 1 addition & 1 deletion src/building/optimized-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,4 @@ Here is an example of how can `opt-dist` be used locally (outside of CI):
[`Environment`]: https://github.com/rust-lang/rust/blob/ee451f8faccf3050c76cdcd82543c917b40c7962/src/tools/opt-dist/src/environment.rs#L5

> Note: if you want to run the actual CI pipeline, instead of running `opt-dist` locally,
> you can execute `python3 src/ci/github-actions/ci.py run-local dist-x86_64-linux`.
> you can execute `cargo run --manifest-path src/ci/citool/Cargo.toml run-local dist-x86_64-linux`.
2 changes: 0 additions & 2 deletions src/parallel-rustc.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,8 @@ are implemented differently depending on whether `parallel-compiler` is true.

| data structure | parallel | non-parallel |
| -------------------------------- | --------------------------------------------------- | ------------ |
| OnceCell | std::sync::OnceLock | std::cell::OnceCell |
| Lock\<T> | (parking_lot::Mutex\<T>) | (std::cell::RefCell) |
| RwLock\<T> | (parking_lot::RwLock\<T>) | (std::cell::RefCell) |
| MTRef<'a, T> | &'a T | &'a mut T |
| MTLock\<T> | (Lock\<T>) | (T) |
| ReadGuard | parking_lot::RwLockReadGuard | std::cell::Ref |
| MappedReadGuard | parking_lot::MappedRwLockReadGuard | std::cell::Ref |
Expand Down
6 changes: 3 additions & 3 deletions src/tests/ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Our CI is primarily executed on [GitHub Actions], with a single workflow defined
in [`.github/workflows/ci.yml`], which contains a bunch of steps that are
unified for all CI jobs that we execute. When a commit is pushed to a
corresponding branch or a PR, the workflow executes the
[`src/ci/github-actions/ci.py`] script, which dynamically generates the specific CI
[`src/ci/citool`] crate, which dynamically generates the specific CI
jobs that should be executed. This script uses the [`jobs.yml`] file as an
input, which contains a declarative configuration of all our CI jobs.

Expand Down Expand Up @@ -299,7 +299,7 @@ platform’s custom [Docker container]. This has a lot of advantages for us:
- We can avoid reinstalling tools (like QEMU or the Android emulator) every time
thanks to Docker image caching.
- Users can run the same tests in the same environment locally by just running
`python3 src/ci/github-actions/ci.py run-local <job-name>`, which is awesome to debug failures. Note that there are only linux docker images available locally due to licensing and
`cargo run --manifest-path src/ci/citool/Cargo.toml run-local <job-name>`, which is awesome to debug failures. Note that there are only linux docker images available locally due to licensing and
other restrictions.

The docker images prefixed with `dist-` are used for building artifacts while
Expand Down Expand Up @@ -443,7 +443,7 @@ this:
[GitHub Actions]: https://github.com/rust-lang/rust/actions
[`jobs.yml`]: https://github.com/rust-lang/rust/blob/master/src/ci/github-actions/jobs.yml
[`.github/workflows/ci.yml`]: https://github.com/rust-lang/rust/blob/master/.github/workflows/ci.yml
[`src/ci/github-actions/ci.py`]: https://github.com/rust-lang/rust/blob/master/src/ci/github-actions/ci.py
[`src/ci/citool`]: https://github.com/rust-lang/rust/blob/master/src/ci/citool
[rust-lang-ci]: https://github.com/rust-lang-ci/rust/actions
[bors]: https://github.com/bors
[homu]: https://github.com/rust-lang/homu
Expand Down
30 changes: 1 addition & 29 deletions src/tests/compiletest.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ The following test suites are available, with links for more information:

### General purpose test suite

[`run-make`](#run-make-tests) are general purpose tests using Rust programs (or
Makefiles (legacy)).
[`run-make`](#run-make-tests) are general purpose tests using Rust programs.

### Rustdoc test suites

Expand Down Expand Up @@ -396,14 +395,6 @@ your test, causing separate files to be generated for 32bit and 64bit systems.

### `run-make` tests

> **Note on phasing out `Makefile`s**
>
> We are planning to migrate all existing Makefile-based `run-make` tests
> to Rust programs. You should not be adding new Makefile-based `run-make`
> tests.
>
> See <https://github.com/rust-lang/rust/issues/121876>.

The tests in [`tests/run-make`] are general-purpose tests using Rust *recipes*,
which are small programs (`rmake.rs`) allowing arbitrary Rust code such as
`rustc` invocations, and is supported by a [`run_make_support`] library. Using
Expand All @@ -424,11 +415,6 @@ Compiletest directives like `//@ only-<target>` or `//@ ignore-<target>` are
supported in `rmake.rs`, like in UI tests. However, revisions or building
auxiliary via directives are not currently supported.

Two `run-make` tests are ported over to Rust recipes as examples:

- <https://github.com/rust-lang/rust/tree/master/tests/run-make/CURRENT_RUSTC_VERSION>
- <https://github.com/rust-lang/rust/tree/master/tests/run-make/a-b-a-linker-guard>

#### Quickly check if `rmake.rs` tests can be compiled

You can quickly check if `rmake.rs` tests can be compiled without having to
Expand Down Expand Up @@ -481,20 +467,6 @@ Then add a corresponding entry to `"rust-analyzer.linkedProjects"`
],
```

#### Using Makefiles (legacy)

<div class="warning">
You should avoid writing new Makefile-based `run-make` tests.
</div>

Each test should be in a separate directory with a `Makefile` indicating the
commands to run.

There is a [`tools.mk`] Makefile which you can include which provides a bunch of
utilities to make it easier to run commands and compare outputs. Take a look at
some of the other tests for some examples on how to get started.

[`tools.mk`]: https://github.com/rust-lang/rust/blob/master/tests/run-make/tools.mk
[`tests/run-make`]: https://github.com/rust-lang/rust/tree/master/tests/run-make
[`run_make_support`]: https://github.com/rust-lang/rust/tree/master/src/tools/run-make-support

Expand Down
8 changes: 2 additions & 6 deletions src/tests/directives.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
FIXME(jieyouxu) completely revise this chapter.
-->

Directives are special comments that tell compiletest how to build and interpret
a test. They must appear before the Rust source in the test. They may also
appear in `rmake.rs` or legacy Makefiles for [run-make
tests](compiletest.md#run-make-tests).
Directives are special comments that tell compiletest how to build and interpret a test. They must appear before the Rust source in the test. They may also appear in `rmake.rs` [run-make tests](compiletest.md#run-make-tests).

They are normally put after the short comment that explains the point of this
test. Compiletest test suites use `//@` to signal that a comment is a directive.
Expand Down Expand Up @@ -142,6 +139,7 @@ Some examples of `X` in `ignore-X` or `only-X`:
matches that target as well as the emscripten targets.
- Pointer width: `32bit`, `64bit`
- Endianness: `endian-big`
- Binary format: `elf`
- Stage: `stage0`, `stage1`, `stage2`
- Channel: `stable`, `beta`
- When cross compiling: `cross-compile`
Expand Down Expand Up @@ -221,8 +219,6 @@ The following directives will check LLVM support:
[`aarch64-gnu-debug`]), which only runs a
subset of `run-make` tests. Other tests with this directive will not
run at all, which is usually not what you want.
- Notably, the [`aarch64-gnu-debug`] CI job *currently* only runs `run-make`
tests which additionally contain `clang` in their test name.

See also [Debuginfo tests](compiletest.md#debuginfo-tests) for directives for
ignoring debuggers.
Expand Down
9 changes: 9 additions & 0 deletions src/tests/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ Some additional notes about using the interactive mode:
containers. With the container name, run `docker exec -it <CONTAINER>
/bin/bash` where `<CONTAINER>` is the container name like `4ba195e95cef`.

The approach described above is a relatively low-level interface for running the Docker images
directly. If you want to run a full CI Linux job locally with Docker, in a way that is as close to CI as possible, you can use the following command:

```bash
cargo run --manifest-path src/ci/citool/Cargo.toml run-local <job-name>
# For example:
cargo run --manifest-path src/ci/citool/Cargo.toml run-local dist-x86_64-linux-alt
```

[Docker]: https://www.docker.com/
[`src/ci/docker`]: https://github.com/rust-lang/rust/tree/master/src/ci/docker
[`src/ci/docker/run.sh`]: https://github.com/rust-lang/rust/blob/master/src/ci/docker/run.sh
Expand Down
25 changes: 0 additions & 25 deletions src/tests/running.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,30 +238,6 @@ This is much faster, but doesn't always work. For example, some tests include
directives that specify specific compiler flags, or which rely on other crates,
and they may not run the same without those options.

## Running `run-make` tests

### Windows

Running the `run-make` test suite on Windows is a currently bit more involved.
There are numerous prerequisites and environmental requirements:

- Install msys2: <https://www.msys2.org/>
- Specify `MSYS2_PATH_TYPE=inherit` in `msys2.ini` in the msys2 installation directory, run the
following with `MSYS2 MSYS`:
- `pacman -Syuu`
- `pacman -S make`
- `pacman -S diffutils`
- `pacman -S binutils`
- `./x test run-make` (`./x test tests/run-make` doesn't work)

There is [on-going work][port-run-make] to not rely on `Makefile`s in the
run-make test suite. Once this work is completed, you can run the entire
`run-make` test suite on native Windows inside `cmd` or `PowerShell` without
needing to install and use MSYS2. As of <!--date-check --> Oct 2024, it is
already possible to run the vast majority of the `run-make` test suite outside
of MSYS2, but there will be failures for the tests that still use `Makefile`s
due to not finding `make`.

## Running tests on a remote machine

Tests may be run on a remote machine (e.g. to test builds for a different
Expand Down Expand Up @@ -406,4 +382,3 @@ If you encounter bugs or problems, don't hesitate to open issues on the
repository](https://github.com/rust-lang/rustc_codegen_gcc/).

[`tests/ui`]: https://github.com/rust-lang/rust/tree/master/tests/ui
[port-run-make]: https://github.com/rust-lang/rust/issues/121876