Skip to content

Commit 8779cf4

Browse files
authored
Merge branch 'master' into handle-potential-query-instability-lint-for-rustc-middle
2 parents 6a2a210 + cb06d12 commit 8779cf4

File tree

14,832 files changed

+804636
-239580
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

14,832 files changed

+804636
-239580
lines changed

.editorconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ end_of_line = lf
99
charset = utf-8
1010
trim_trailing_whitespace = true
1111
insert_final_newline = true
12+
13+
[!src/llvm-project]
1214
indent_style = space
1315
indent_size = 4
1416

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,5 @@ ec2cc761bc7067712ecc7734502f703fe3b024c8
2929
99cb0c6bc399fb94a0ddde7e9b38e9c00d523bad
3030
# reformat with rustfmt edition 2024
3131
c682aa162b0d41e21cc6748f4fecfe01efb69d1f
32+
# reformat with updated edition 2024
33+
1fcae03369abb4c2cc180cd5a49e1f4440a81300
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
name: Bootstrap (Rust Build System) Report
3+
about: Issues encountered on bootstrap build system
4+
labels: C-bug, T-bootstrap
5+
---
6+
7+
<!--
8+
Thank you for submitting a bootstrap report! Please provide detailed information to help us reproduce and diagnose the issue.
9+
-->
10+
11+
### Summary
12+
13+
<!--
14+
Provide a brief description of the problem you are experiencing.
15+
-->
16+
17+
### Command used
18+
19+
```sh
20+
<command>
21+
```
22+
23+
### Expected behaviour
24+
25+
<!--
26+
Describe what you expected to happen.
27+
-->
28+
29+
### Actual behaviour
30+
31+
<!--
32+
Describe what actually happened.
33+
-->
34+
35+
### Bootstrap configuration (config.toml)
36+
```toml
37+
<config>
38+
```
39+
40+
### Operating system
41+
42+
<!--
43+
e.g., Ubuntu 22.04, macOS 12, Windows 10
44+
-->
45+
46+
### HEAD
47+
48+
<!--
49+
Output of `git rev-parse HEAD` command, or content of the `git-commit-hash` file if using a tarball source.
50+
-->
51+
52+
### Additional context
53+
<!--
54+
Include any other relevant information (e.g., if you have custom patches or modifications on the project).
55+
-->
56+
57+
58+
<!--
59+
Include the complete build log in the section below.
60+
Enable backtrace and verbose mode if possible for more detailed information e.g., with `RUST_BACKTRACE=1 ./x build -v`.
61+
-->
62+
<details><summary>Build Log</summary>
63+
<p>
64+
65+
```txt
66+
<log>
67+
```
68+
69+
</p>
70+
</details>

.github/ISSUE_TEMPLATE/tracking_issue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ for larger features an implementation could be broken up into multiple PRs.
4646

4747
[stabilization-guide]: https://rustc-dev-guide.rust-lang.org/stabilization_guide.html#stabilization-pr
4848
[doc-guide]: https://rustc-dev-guide.rust-lang.org/stabilization_guide.html#documentation-prs
49-
[nightly-style-procedure]: https://github.com/rust-lang/style-team/blob/master/nightly-style-procedure.md
49+
[nightly-style-procedure]: https://github.com/rust-lang/style-team/blob/main/nightly-style-procedure.md
5050
[Style Guide]: https://github.com/rust-lang/rust/tree/master/src/doc/style-guide
5151

5252
### Unresolved Questions

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ tracking issue or there are none, feel free to ignore this.
77
This PR will get automatically assigned to a reviewer. In case you would like
88
a specific user to review your work, you can assign it to them by using
99
10-
r\? <reviewer name> (with the `\` removed)
10+
r? <reviewer name>
1111
-->
1212
<!-- homu-ignore:end -->

.github/renovate.json5

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
// Let Renovatebot keep an opened issue that tracks our dependencies
4+
"dependencyDashboard": true,
5+
// Disable "normal" package updates
6+
"enabledManagers": [],
7+
// Update lockfiles once per week
8+
"lockFileMaintenance": {
9+
"enabled": true,
10+
"schedule": [
11+
"before 5am on Tuesday"
12+
]
13+
}
14+
}

.github/workflows/ci.yml

Lines changed: 19 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# and also on pushes to special branches (auto, try).
33
#
44
# The actual definition of the executed jobs is calculated by a Python
5-
# script located at src/ci/github-actions/calculate-job-matrix.py, which
5+
# script located at src/ci/github-actions/ci.py, which
66
# uses job definition data from src/ci/github-actions/jobs.yml.
77
# You should primarily modify the `jobs.yml` file if you want to modify
88
# what jobs are executed in CI.
@@ -46,7 +46,7 @@ jobs:
4646
# If you want to modify CI jobs, take a look at src/ci/github-actions/jobs.yml.
4747
calculate_matrix:
4848
name: Calculate job matrix
49-
runs-on: ubuntu-latest
49+
runs-on: ubuntu-24.04
5050
outputs:
5151
jobs: ${{ steps.jobs.outputs.jobs }}
5252
run_type: ${{ steps.jobs.outputs.run_type }}
@@ -56,46 +56,28 @@ jobs:
5656
- name: Calculate the CI job matrix
5757
env:
5858
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
59-
run: python3 src/ci/github-actions/calculate-job-matrix.py >> $GITHUB_OUTPUT
59+
run: python3 src/ci/github-actions/ci.py calculate-job-matrix >> $GITHUB_OUTPUT
6060
id: jobs
6161
job:
62-
name: ${{ matrix.name }}
62+
name: ${{ matrix.full_name }}
6363
needs: [ calculate_matrix ]
6464
runs-on: "${{ matrix.os }}"
65-
defaults:
66-
run:
67-
shell: ${{ contains(matrix.os, 'windows') && 'msys2 {0}' || 'bash' }}
68-
timeout-minutes: 240
65+
timeout-minutes: 360
6966
env:
70-
CI_JOB_NAME: ${{ matrix.image }}
67+
CI_JOB_NAME: ${{ matrix.name }}
7168
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
7269
# commit of PR sha or commit sha. `GITHUB_SHA` is not accurate for PRs.
7370
HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
7471
DOCKER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7572
SCCACHE_BUCKET: rust-lang-ci-sccache2
73+
SCCACHE_REGION: us-west-1
7674
CACHE_DOMAIN: ci-caches.rust-lang.org
7775
continue-on-error: ${{ matrix.continue_on_error || false }}
7876
strategy:
7977
matrix:
8078
# Check the `calculate_matrix` job to see how is the matrix defined.
8179
include: ${{ fromJSON(needs.calculate_matrix.outputs.jobs) }}
8280
steps:
83-
- if: contains(matrix.os, 'windows')
84-
uses: msys2/[email protected]
85-
with:
86-
# i686 jobs use mingw32. x86_64 and cross-compile jobs use mingw64.
87-
msystem: ${{ contains(matrix.name, 'i686') && 'mingw32' || 'mingw64' }}
88-
# don't try to download updates for already installed packages
89-
update: false
90-
# don't try to use the msys that comes built-in to the github runner,
91-
# so we can control what is installed (i.e. not python)
92-
release: true
93-
# Inherit the full path from the Windows environment, with MSYS2's */bin/
94-
# dirs placed in front. This lets us run Windows-native Python etc.
95-
path-type: inherit
96-
install: >
97-
make
98-
9981
- name: disable git crlf conversion
10082
run: git config --global core.autocrlf false
10183

@@ -109,12 +91,8 @@ jobs:
10991
# intensive jobs to run on free runners, which however also have
11092
# less disk space.
11193
- name: free up disk space
112-
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
113-
if: contains(matrix.os, 'ubuntu')
114-
with:
115-
# Removing packages with APT saves ~5 GiB, but takes several
116-
# minutes (and potentially removes important packages).
117-
large-packages: false
94+
run: src/ci/scripts/free-disk-space.sh
95+
if: matrix.free_disk
11896

11997
# Rust Log Analyzer can't currently detect the PR number of a GitHub
12098
# Actions build on its own, so a hint in the log message is needed to
@@ -196,6 +174,11 @@ jobs:
196174
- name: ensure the stable version number is correct
197175
run: src/ci/scripts/verify-stable-version-number.sh
198176

177+
# Show the environment just before we run the build
178+
# This makes it easier to diagnose problems with the above install scripts.
179+
- name: show the current environment
180+
run: src/ci/scripts/dump-environment.sh
181+
199182
- name: run the build
200183
# Redirect stderr to stdout to avoid reordering the two streams in the GHA logs.
201184
run: src/ci/scripts/run-build-from-ci.sh 2>&1
@@ -237,16 +220,17 @@ jobs:
237220
env:
238221
DATADOG_SITE: datadoghq.com
239222
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
240-
DD_GITHUB_JOB_NAME: ${{ matrix.name }}
223+
DD_GITHUB_JOB_NAME: ${{ matrix.full_name }}
241224
run: |
242-
npm install -g @datadog/datadog-ci@^2.x.x
243-
python3 src/ci/scripts/upload-build-metrics.py build/cpu-usage.csv
225+
cd src/ci
226+
npm ci
227+
python3 scripts/upload-build-metrics.py ../../build/cpu-usage.csv
244228
245229
# This job isused to tell bors the final status of the build, as there is no practical way to detect
246230
# when a workflow is successful listening to webhooks only in our current bors implementation (homu).
247231
outcome:
248232
name: bors build finished
249-
runs-on: ubuntu-latest
233+
runs-on: ubuntu-24.04
250234
needs: [ calculate_matrix, job ]
251235
# !cancelled() executes the job regardless of whether the previous jobs passed or failed
252236
if: ${{ !cancelled() && contains(fromJSON('["auto", "try"]'), needs.calculate_matrix.outputs.run_type) }}

.github/workflows/dependencies.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
not-waiting-on-bors:
2828
if: github.repository_owner == 'rust-lang'
2929
name: skip if S-waiting-on-bors
30-
runs-on: ubuntu-latest
30+
runs-on: ubuntu-24.04
3131
steps:
3232
- env:
3333
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -47,7 +47,7 @@ jobs:
4747
if: github.repository_owner == 'rust-lang'
4848
name: update dependencies
4949
needs: not-waiting-on-bors
50-
runs-on: ubuntu-latest
50+
runs-on: ubuntu-24.04
5151
steps:
5252
- name: checkout the source code
5353
uses: actions/checkout@v4
@@ -94,7 +94,7 @@ jobs:
9494
if: github.repository_owner == 'rust-lang'
9595
name: amend PR
9696
needs: update
97-
runs-on: ubuntu-latest
97+
runs-on: ubuntu-24.04
9898
permissions:
9999
contents: write
100100
pull-requests: write

.github/workflows/ghcr.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Mirror DockerHub images used by the Rust project to ghcr.io.
2+
# Images are available at https://github.com/orgs/rust-lang/packages.
3+
#
4+
# In some CI jobs, we pull images from ghcr.io instead of Docker Hub because
5+
# Docker Hub has a rate limit, while ghcr.io doesn't.
6+
# Those images are pushed to ghcr.io by this job.
7+
#
8+
# Note that authenticating to DockerHub or other registries isn't possible
9+
# for PR jobs, because forks can't access secrets.
10+
# That's why we use ghcr.io: it has no rate limit and it doesn't require authentication.
11+
12+
name: GHCR image mirroring
13+
14+
on:
15+
workflow_dispatch:
16+
schedule:
17+
# Run daily at midnight UTC
18+
- cron: '0 0 * * *'
19+
20+
jobs:
21+
mirror:
22+
name: DockerHub mirror
23+
runs-on: ubuntu-24.04
24+
if: github.repository == 'rust-lang/rust'
25+
permissions:
26+
# Needed to write to the ghcr.io registry
27+
packages: write
28+
steps:
29+
- uses: actions/checkout@v4
30+
with:
31+
persist-credentials: false
32+
33+
- name: Log in to registry
34+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
35+
36+
# Download crane in the current directory.
37+
# We use crane because it copies the docker image for all the architectures available in
38+
# DockerHub for the image.
39+
# Learn more about crane at
40+
# https://github.com/google/go-containerregistry/blob/main/cmd/crane/README.md
41+
- name: Download crane
42+
run: |
43+
curl -sL "https://github.com/google/go-containerregistry/releases/download/${VERSION}/go-containerregistry_${OS}_${ARCH}.tar.gz" | tar -xzf -
44+
env:
45+
VERSION: v0.20.2
46+
OS: Linux
47+
ARCH: x86_64
48+
49+
- name: Mirror DockerHub
50+
run: |
51+
# List of DockerHub images to mirror to ghcr.io
52+
images=(
53+
# Mirrored because used by the mingw-check-tidy, which doesn't cache Docker images
54+
"ubuntu:22.04"
55+
# Mirrored because used by all linux CI jobs, including mingw-check-tidy
56+
"moby/buildkit:buildx-stable-1"
57+
)
58+
59+
# Mirror each image from DockerHub to ghcr.io
60+
for img in "${images[@]}"; do
61+
echo "Mirroring ${img}..."
62+
# Remove namespace from the image if any.
63+
# E.g. "moby/buildkit:buildx-stable-1" becomes "buildkit:buildx-stable-1"
64+
dest_image=$(echo "${img}" | cut -d'/' -f2-)
65+
./crane copy \
66+
"docker.io/${img}" \
67+
"ghcr.io/${{ github.repository_owner }}/${dest_image}"
68+
done

.gitignore

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,16 @@ no_llvm_build
4646
/inst/
4747
/llvm/
4848
/mingw-build/
49-
build/
50-
!/compiler/rustc_mir_build/src/build/
49+
/build
5150
/build-rust-analyzer/
5251
/dist/
5352
/unicode-downloads
5453
/target
5554
/library/target
5655
/src/bootstrap/target
5756
/src/tools/x/target
57+
# Created by `x vendor`
58+
/vendor
5859
# Created by default with `src/ci/docker/run.sh`
5960
/obj/
6061
# Created by nix dev shell / .envrc
@@ -84,17 +85,18 @@ __pycache__/
8485
node_modules
8586
package-lock.json
8687
package.json
88+
/src/doc/rustc-dev-guide/mermaid.min.js
8789

8890
## Rustdoc GUI tests
8991
tests/rustdoc-gui/src/**.lock
9092

9193
## direnv
92-
.envrc
93-
.direnv/
94+
/.envrc
95+
/.direnv/
9496

9597
## nix
96-
flake.nix
98+
/flake.nix
9799
flake.lock
98-
default.nix
100+
/default.nix
99101

100102
# Before adding new lines, see the comment at the top.

0 commit comments

Comments
 (0)