Skip to content

Commit cfe9d15

Browse files
committed
Merge branch 'master' into set_ipv6_sock_hop_limit
2 parents 6657c75 + e4b5219 commit cfe9d15

File tree

19,562 files changed

+1325017
-342830
lines changed

Some content is hidden

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

19,562 files changed

+1325017
-342830
lines changed

.editorconfig

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,25 @@ root = true
77
[*]
88
end_of_line = lf
99
charset = utf-8
10-
trim_trailing_whitespace = true
1110
insert_final_newline = true
12-
13-
[!src/llvm-project]
11+
trim_trailing_whitespace = true
1412
indent_style = space
1513
indent_size = 4
1614

15+
# some tests need trailing whitespace in output snapshots
16+
[tests/**]
17+
trim_trailing_whitespace = false
18+
# for actual source code files of test, we still don't want trailing whitespace
19+
[tests/**.{rs,js}]
20+
trim_trailing_whitespace = true
21+
# these specific source files need to have trailing whitespace.
22+
[tests/ui/{frontmatter/frontmatter-whitespace-3.rs,parser/shebang/shebang-space.rs}]
23+
trim_trailing_whitespace = false
24+
25+
[src/llvm-project]
26+
indent_style = unset
27+
indent_size = unset
28+
1729
[*.rs]
1830
max_line_length = 100
1931

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,5 @@ ec2cc761bc7067712ecc7734502f703fe3b024c8
3131
c682aa162b0d41e21cc6748f4fecfe01efb69d1f
3232
# reformat with updated edition 2024
3333
1fcae03369abb4c2cc180cd5a49e1f4440a81300
34+
# Breaking up of compiletest runtest.rs
35+
60600a6fa403216bfd66e04f948b1822f6450af7

.github/ISSUE_TEMPLATE/documentation.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Documentation problem
2-
description: Create a report for a documentation problem.
2+
description: Report an issue with documentation content.
33
labels: ["A-docs"]
44
body:
55
- type: markdown
@@ -19,20 +19,20 @@ body:
1919
- [The Rustonomicon](https://github.com/rust-lang/nomicon/issues)
2020
- [The Embedded Book](https://github.com/rust-embedded/book/issues)
2121
22-
All other documentation issues should be filed here.
22+
Or, if you find an issue related to rustdoc (e.g. doctest, rustdoc UI), please use the rustdoc issue template instead.
2323
24-
Or, if you find an issue related to rustdoc (e.g. doctest, rustdoc UI), please use the bug report or blank issue template instead.
24+
All other documentation issues should be filed here.
2525
2626
- type: textarea
2727
id: location
2828
attributes:
29-
label: Location
29+
label: Location (URL)
3030
validations:
31-
required: true
31+
required: true
3232

3333
- type: textarea
3434
id: summary
3535
attributes:
3636
label: Summary
3737
validations:
38-
required: true
38+
required: true

.github/ISSUE_TEMPLATE/rustdoc.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
name: Problem with rustdoc
3+
about: Report an issue with how docs get generated.
4+
labels: C-bug, T-rustdoc
5+
---
6+
<!--
7+
Thank you for filing a rustdoc issue! Rustdoc is the tool that handles the generation of docs. It is usually invoked via `cargo doc`, but can also be used directly.
8+
9+
If you have an issue with the actual content of the docs, use the "Documentation problem" template instead.
10+
-->
11+
12+
# Code
13+
<!-- problematic snippet and/or link to repo and/or full path of standard library function -->
14+
15+
```rust
16+
<code>
17+
```
18+
19+
# Reproduction Steps
20+
<!--
21+
* command(s) to run, if any
22+
* permalink to hosted documentation, if any
23+
* search query, if any
24+
-->
25+
26+
# Expected Outcome
27+
<!--
28+
What did you want to happen?
29+
30+
For GUI issues, feel free to provide a mockup image of what you want it to look like.
31+
32+
For diagnostics, please provide a mockup of the desired output in a code block.
33+
-->
34+
35+
# Actual Output
36+
<!--
37+
* rustdoc console output
38+
* browser screenshot of generated html
39+
* rustdoc json (prettify by running through `jq` or running thorugh an online formatter)
40+
-->
41+
```console
42+
<code>
43+
```
44+
45+
46+
# Version
47+
<!--
48+
Available via `rustdoc --version` or under the "Help" menu.
49+
50+
If the issue involves opening the documentation in a browser, please also provide the name and version of the browser used.
51+
-->
52+
53+
# Additional Details
54+
<!-- Anything else you think is relevant -->
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
name: Future Incompatibility Tracking Issue
3+
about: A tracking issue for a future-incompatible lint
4+
title: Tracking Issue for future-incompatibility lint XXX
5+
labels: C-tracking-issue C-future-incompatibility T-compiler A-lints
6+
---
7+
<!--
8+
Thank you for creating a future-incompatible tracking issue! 📜 These issues
9+
are for lints that implement a future-incompatible warning.
10+
11+
Remember to add team labels to the tracking issue.
12+
For something that affects the language, this would be `T-lang`, and for libs
13+
it would be `T-libs-api`.
14+
Also check for any `A-` labels to add.
15+
-->
16+
17+
This is the **tracking issue** for the `YOUR_LINT_NAME_HERE` future-compatibility warning and other related errors. The goal of this page is to describe why this change was made and how you can fix code that is affected by it. It also provides a place to ask questions or register a complaint if you feel the change should not be made. For more information on the policy around future-compatibility warnings, see our [breaking change policy guidelines][guidelines].
18+
19+
[guidelines]: https://rustc-dev-guide.rust-lang.org/bug-fix-procedure.html
20+
21+
### What is the warning for?
22+
23+
*Describe the conditions that trigger the warning.*
24+
25+
### Why was this change made?
26+
27+
*Explain why this change was made. If there is additional context, like an MCP, link it here.*
28+
29+
### Example
30+
31+
```rust
32+
// Include an example here.
33+
```
34+
35+
### Recommendations
36+
37+
*Give some recommendations on how a user can avoid the lint.*
38+
39+
### When will this warning become a hard error?
40+
41+
*If known, describe the future plans. For example, how long you anticipate this being a warning, or if there are other factors that will influence the anticipated closure.*
42+
43+
### Steps
44+
45+
- [ ] Implement the lint
46+
- [ ] Raise lint level to deny
47+
- [ ] Change the lint to report in dependencies
48+
- [ ] Switch to a hard error
49+
50+
### Implementation history
51+
52+
<!--
53+
Include a list of all the PRs that were involved in implementing the lint.
54+
-->

.github/workflows/ci.yml

Lines changed: 45 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ concurrency:
3434
# For a given workflow, if we push to the same branch, cancel all previous builds on that branch.
3535
# We add an exception for try builds (try branch) and unrolled rollup builds (try-perf), which
3636
# are all triggered on the same branch, but which should be able to run concurrently.
37-
group: ${{ github.workflow }}-${{ ((github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.sha) || github.ref }}
37+
group: ${{ github.workflow }}-${{ ((github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf' || github.ref == 'refs/heads/automation/bors/try') && github.sha) || github.ref }}
3838
cancel-in-progress: true
3939
env:
4040
TOOLSTATE_REPO: "https://github.com/rust-lang-nursery/rust-toolstate"
@@ -46,26 +46,40 @@ 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-24.04
49+
runs-on: ubuntu-24.04-arm
5050
outputs:
5151
jobs: ${{ steps.jobs.outputs.jobs }}
5252
run_type: ${{ steps.jobs.outputs.run_type }}
5353
steps:
5454
- name: Checkout the source code
55-
uses: actions/checkout@v4
55+
uses: actions/checkout@v5
56+
- name: Test citool
57+
# Only test citool on the auto branch, to reduce latency of the calculate matrix job
58+
# on PR/try builds.
59+
if: ${{ github.ref == 'refs/heads/auto' }}
60+
run: |
61+
cd src/ci/citool
62+
CARGO_INCREMENTAL=0 cargo test
5663
- name: Calculate the CI job matrix
5764
env:
5865
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
5966
run: |
6067
cd src/ci/citool
61-
CARGO_INCREMENTAL=0 cargo test
6268
CARGO_INCREMENTAL=0 cargo run calculate-job-matrix >> $GITHUB_OUTPUT
6369
id: jobs
6470
job:
6571
name: ${{ matrix.full_name }}
6672
needs: [ calculate_matrix ]
6773
runs-on: "${{ matrix.os }}"
6874
timeout-minutes: 360
75+
# The bors environment contains secrets required for elevated workflows (try and auto builds),
76+
# which need to access e.g. S3 and upload artifacts. We want to provide access to that
77+
# environment only on the try/auto branches, which are only accessible to bors.
78+
# This also ensures that PR CI (which doesn't get write access to S3) works, as it cannot
79+
# access the environment.
80+
#
81+
# We only enable the environment for the rust-lang/rust repository, so that CI works on forks.
82+
environment: ${{ ((github.repository == 'rust-lang/rust' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf' || github.ref == 'refs/heads/automation/bors/try' || github.ref == 'refs/heads/auto')) && 'bors') || '' }}
6983
env:
7084
CI_JOB_NAME: ${{ matrix.name }}
7185
CI_JOB_DOC_URL: ${{ matrix.doc_url }}
@@ -84,11 +98,22 @@ jobs:
8498
# Check the `calculate_matrix` job to see how is the matrix defined.
8599
include: ${{ fromJSON(needs.calculate_matrix.outputs.jobs) }}
86100
steps:
101+
- name: Install cargo in AWS CodeBuild
102+
if: matrix.codebuild
103+
run: |
104+
# Check if cargo is installed
105+
if ! command -v cargo &> /dev/null; then
106+
echo "Cargo not found, installing Rust..."
107+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal
108+
# Make cargo available in PATH
109+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
110+
fi
111+
87112
- name: disable git crlf conversion
88113
run: git config --global core.autocrlf false
89114

90115
- name: checkout the source code
91-
uses: actions/checkout@v4
116+
uses: actions/checkout@v5
92117
with:
93118
fetch-depth: 2
94119

@@ -97,9 +122,16 @@ jobs:
97122
# intensive jobs to run on free runners, which however also have
98123
# less disk space.
99124
- name: free up disk space
100-
run: src/ci/scripts/free-disk-space.sh
125+
run: src/ci/scripts/free-disk-space-linux.sh
101126
if: matrix.free_disk
102127

128+
# If we don't need to free up disk space then just report how much space we have
129+
- name: print disk usage
130+
run: |
131+
echo "disk usage:"
132+
df -h
133+
if: matrix.free_disk == false
134+
103135
# Rust Log Analyzer can't currently detect the PR number of a GitHub
104136
# Actions build on its own, so a hint in the log message is needed to
105137
# point it in the right direction.
@@ -118,9 +150,6 @@ jobs:
118150
# which then uses log commands to actually set them.
119151
EXTRA_VARIABLES: ${{ toJson(matrix.env) }}
120152

121-
- name: setup upstream remote
122-
run: src/ci/scripts/setup-upstream-remote.sh
123-
124153
- name: ensure the channel matches the target branch
125154
run: src/ci/scripts/verify-channel.sh
126155

@@ -161,6 +190,8 @@ jobs:
161190
run: src/ci/scripts/install-ninja.sh
162191

163192
- name: enable ipv6 on Docker
193+
# Don't run on codebuild because systemctl is not available
194+
if: ${{ !matrix.codebuild }}
164195
run: src/ci/scripts/enable-docker-ipv6.sh
165196

166197
# Disable automatic line ending conversion (again). On Windows, when we're
@@ -208,8 +239,8 @@ jobs:
208239
fi
209240
exit ${STATUS}
210241
env:
211-
AWS_ACCESS_KEY_ID: ${{ env.CACHES_AWS_ACCESS_KEY_ID }}
212-
AWS_SECRET_ACCESS_KEY: ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}
242+
AWS_ACCESS_KEY_ID: ${{ secrets.CACHES_AWS_ACCESS_KEY_ID }}
243+
AWS_SECRET_ACCESS_KEY: ${{ secrets.CACHES_AWS_SECRET_ACCESS_KEY }}
213244

214245
- name: create github artifacts
215246
run: src/ci/scripts/create-doc-artifacts.sh
@@ -231,8 +262,8 @@ jobs:
231262
- name: upload artifacts to S3
232263
run: src/ci/scripts/upload-artifacts.sh
233264
env:
234-
AWS_ACCESS_KEY_ID: ${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}
235-
AWS_SECRET_ACCESS_KEY: ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}
265+
AWS_ACCESS_KEY_ID: ${{ secrets.ARTIFACTS_AWS_ACCESS_KEY_ID }}
266+
AWS_SECRET_ACCESS_KEY: ${{ secrets.ARTIFACTS_AWS_SECRET_ACCESS_KEY }}
236267
# Adding a condition on DEPLOY=1 or DEPLOY_ALT=1 is not needed as all deploy
237268
# builders *should* have the AWS credentials available. Still, explicitly
238269
# adding the condition is helpful as this way CI will not silently skip
@@ -282,7 +313,7 @@ jobs:
282313
if: ${{ !cancelled() && contains(fromJSON('["auto", "try"]'), needs.calculate_matrix.outputs.run_type) }}
283314
steps:
284315
- name: checkout the source code
285-
uses: actions/checkout@v4
316+
uses: actions/checkout@v5
286317
with:
287318
fetch-depth: 2
288319
# Calculate the exit status of the whole CI workflow.

.github/workflows/dependencies.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ env:
1919
PR_TITLE: Weekly `cargo update`
2020
PR_MESSAGE: |
2121
Automation to keep dependencies in `Cargo.lock` current.
22+
r? dep-bumps
2223
2324
The following is the output from `cargo update`:
2425
COMMIT_MESSAGE: "cargo update \n\n"
@@ -50,7 +51,7 @@ jobs:
5051
runs-on: ubuntu-24.04
5152
steps:
5253
- name: checkout the source code
53-
uses: actions/checkout@v4
54+
uses: actions/checkout@v5
5455
with:
5556
submodules: recursive
5657
- name: install the bootstrap toolchain
@@ -100,7 +101,7 @@ jobs:
100101
pull-requests: write
101102
steps:
102103
- name: checkout the source code
103-
uses: actions/checkout@v4
104+
uses: actions/checkout@v5
104105

105106
- name: download Cargo.lock from update job
106107
uses: actions/download-artifact@v4

.github/workflows/ghcr.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
# Needed to write to the ghcr.io registry
3030
packages: write
3131
steps:
32-
- uses: actions/checkout@v4
32+
- uses: actions/checkout@v5
3333
with:
3434
persist-credentials: false
3535

@@ -53,9 +53,9 @@ jobs:
5353
run: |
5454
# List of DockerHub images to mirror to ghcr.io
5555
images=(
56-
# Mirrored because used by the mingw-check-tidy, which doesn't cache Docker images
56+
# Mirrored because used by the tidy job, which doesn't cache Docker images
5757
"ubuntu:22.04"
58-
# Mirrored because used by all linux CI jobs, including mingw-check-tidy
58+
# Mirrored because used by all linux CI jobs, including tidy
5959
"moby/buildkit:buildx-stable-1"
6060
# Mirrored because used when CI is running inside a Docker container
6161
"alpine:3.4"

.github/workflows/post-merge.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
permissions:
1616
pull-requests: write
1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v5
1919
with:
2020
# Make sure that we have enough commits to find the parent merge commit.
2121
# Since all merges should be through merge commits, fetching two commits
@@ -25,12 +25,19 @@ jobs:
2525
env:
2626
GH_TOKEN: ${{ github.token }}
2727
run: |
28+
# Give GitHub some time to propagate the information that the PR was merged
29+
sleep 60
30+
2831
# Get closest bors merge commit
2932
PARENT_COMMIT=`git rev-list --author='bors <[email protected]>' -n1 --first-parent HEAD^1`
3033
echo "Parent: ${PARENT_COMMIT}"
3134
3235
# Find PR for the current commit
3336
HEAD_PR=`gh pr list --search "${{ github.sha }}" --state merged --json number --jq '.[0].number'`
37+
if [ -z "${HEAD_PR}" ]; then
38+
echo "PR for commit SHA ${{ github.sha }} not found, exiting"
39+
exit 1
40+
fi
3441
echo "HEAD: ${{ github.sha }} (#${HEAD_PR})"
3542
3643
cd src/ci/citool

0 commit comments

Comments
 (0)