Skip to content

Rollup of 10 pull requests #144085

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 54 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
92144e1
Remove `josh-sync` tooling and update README
Kobzol Jul 4, 2025
13dca5e
Update CI workflow to use rustc-josh-sync
Kobzol Jul 4, 2025
9d83749
Document `rustc-josh-sync`
Kobzol Jul 4, 2025
dbad976
Merge pull request #2491 from Kobzol/switch-to-rustc-josh-sync
jieyouxu Jul 4, 2025
f167f9b
external-repos.md: small fixes
tshepang Jul 4, 2025
33c70d9
Merge pull request #2492 from rust-lang/tshepang-patch-1
tshepang Jul 4, 2025
922ee88
Mention that stdarch is managed by josh-sync
Kobzol Jul 8, 2025
342d78d
Merge pull request #2495 from Kobzol/josh-sync-stdarch
jieyouxu Jul 8, 2025
24a25db
Revert `tests/run-make/mte-ffi` changes
jieyouxu Jun 10, 2025
37136dd
Disable `tests/run-make/mte-ffi`
jieyouxu Jul 8, 2025
6b8bc68
use a consistent (and recommended) invocation
tshepang Jul 9, 2025
120a361
Merge pull request #2496 from rust-lang/tshepang-a-convenience
tshepang Jul 9, 2025
7b394d2
tweak some git clone commands
tshepang Jul 9, 2025
42472f2
add missing word
tshepang Jul 9, 2025
d99af0b
distcheck had only one possible invocation
tshepang Jul 9, 2025
99fc05b
do not invent a name
tshepang Jul 9, 2025
1a6e543
Merge pull request #2498 from rust-lang/tshepang-patch-1
Noratrieb Jul 10, 2025
7c76abc
Merge pull request #2500 from rust-lang/tshepang-patch-3
Noratrieb Jul 10, 2025
1ef0072
Merge pull request #2499 from rust-lang/tshepang-patch-2
Noratrieb Jul 10, 2025
f1ae43f
Mention that compiler-builtins is now using `rustc-josh-sync`
Kobzol Jul 10, 2025
c6bedc1
Migrate rustc-pull to CI workflow from `josh-sync`
Kobzol Jul 10, 2025
c7cdd14
Merge pull request #2501 from Kobzol/compiler-builtins-josh
jieyouxu Jul 10, 2025
c46e385
Merge pull request #2502 from Kobzol/rustc-josh-sync-ci
jieyouxu Jul 11, 2025
7803c25
directives.md: build-aux-docs does not work with aux-crate
lolbinarycat Jul 11, 2025
39f269c
Merge pull request #2497 from rust-lang/tshepang-git-clone
ZuseZ4 Jul 14, 2025
8ec7e6f
Merge pull request #2504 from lolbinarycat/lolbinarycat-patch-2
jieyouxu Jul 15, 2025
0e423f4
Boostrap: add warning on `optimize = false`
xdoardo Jul 16, 2025
9ef3be2
go over invariants again :3
lcnr Jul 16, 2025
6237eaf
Merge pull request #2506 from lcnr/type-system-invariants
lcnr Jul 16, 2025
8df6a1d
some improvements to "Invariants of the type system"
tshepang Jul 17, 2025
c113a60
Merge pull request #2507 from rust-lang/tshepang-misc
tshepang Jul 17, 2025
2faf5ed
Prepare for merging from rust-lang/rust
invalid-email-address Jul 17, 2025
ce0de76
Merge ref 'fd2eb391d032' from rust-lang/rust
invalid-email-address Jul 17, 2025
b2474c8
Merge pull request #2508 from rust-lang/rustc-pull
tshepang Jul 17, 2025
dd364bd
copy-paste convenience
tshepang Jul 17, 2025
41c0c5b
Merge pull request #2510 from rust-lang/tshepang-patch-1
tshepang Jul 17, 2025
b7d2782
Remove install Rust script from CI
Kobzol Jul 17, 2025
6645bf5
Copy GCC sources into the build directory even outside CI
Kobzol Jul 17, 2025
2ca2d93
Auto-label `src/ci` and `.github/workflows` with `A-CI`
jieyouxu Jul 17, 2025
491b873
Add myself to `infra-ci` reviewer group
jieyouxu Jul 17, 2025
f204801
fix: fix issue 143740, Wrong messages from compiler confusing methods…
lichuang Jul 16, 2025
a886852
ci: use windows 22 for all free runners
marcoieni Jul 17, 2025
c375244
Add test for `default_field_values` and `const_default`
estebank Jul 8, 2025
bf24c0d
miri sleep tests: increase slack
RalfJung Jul 17, 2025
8cdbdb6
Rollup merge of #142300 - jieyouxu:exp-partial-revert-141576, r=Waffl…
Kobzol Jul 17, 2025
e42f741
Rollup merge of #143649 - estebank:const-trait-default-field-value, r…
Kobzol Jul 17, 2025
62108ca
Rollup merge of #144010 - xdoardo:bootstrap-warning-optimize-false, r…
Kobzol Jul 17, 2025
dcf349c
Rollup merge of #144029 - lichuang:fix_issue_143740, r=compiler-errors
Kobzol Jul 17, 2025
d817033
Rollup merge of #144049 - tshepang:rust-push, r=jieyouxu
Kobzol Jul 17, 2025
0f552cd
Rollup merge of #144053 - Kobzol:ci-remove-install-rust, r=jieyouxu
Kobzol Jul 17, 2025
03f315f
Rollup merge of #144056 - Kobzol:gcc-build-src, r=nikic
Kobzol Jul 17, 2025
249761d
Rollup merge of #144063 - jieyouxu:label-ci, r=Kobzol
Kobzol Jul 17, 2025
5908298
Rollup merge of #144069 - marcoieni:windows-22-free, r=jieyouxu
Kobzol Jul 17, 2025
0ae8205
Rollup merge of #144083 - RalfJung:miri-sleep, r=oli-obk
Kobzol Jul 17, 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
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,6 @@ jobs:
- name: show the current environment
run: src/ci/scripts/dump-environment.sh

- name: install rust
run: src/ci/scripts/install-rust.sh

- name: install awscli
run: src/ci/scripts/install-awscli.sh

Expand Down
3 changes: 2 additions & 1 deletion compiler/rustc_hir_typeck/src/method/probe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1650,7 +1650,8 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
}
}

let sources = candidates.iter().map(|p| self.candidate_source(p, self_ty)).collect();
let sources =
applicable_candidates.iter().map(|p| self.candidate_source(p.0, self_ty)).collect();
return Some(Err(MethodError::Ambiguity(sources)));
}

Expand Down
25 changes: 11 additions & 14 deletions src/bootstrap/src/core/build_steps/gcc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,21 +220,18 @@ fn build_gcc(metadata: &Meta, builder: &Builder<'_>, target: TargetSelection) {
t!(fs::create_dir_all(install_dir));

// GCC creates files (e.g. symlinks to the downloaded dependencies)
// in the source directory, which does not work with our CI setup, where we mount
// in the source directory, which does not work with our CI/Docker setup, where we mount
// source directories as read-only on Linux.
// Therefore, as a part of the build in CI, we first copy the whole source directory
// to the build directory, and perform the build from there.
let src_dir = if builder.config.is_running_on_ci {
let src_dir = builder.gcc_out(target).join("src");
if src_dir.exists() {
builder.remove_dir(&src_dir);
}
builder.create_dir(&src_dir);
builder.cp_link_r(root, &src_dir);
src_dir
} else {
root.clone()
};
// And in general, we shouldn't be modifying the source directories if possible, even for local
// builds.
// Therefore, we first copy the whole source directory to the build directory, and perform the
// build from there.
let src_dir = builder.gcc_out(target).join("src");
if src_dir.exists() {
builder.remove_dir(&src_dir);
}
builder.create_dir(&src_dir);
builder.cp_link_r(root, &src_dir);

command(src_dir.join("contrib/download_prerequisites")).current_dir(&src_dir).run(builder);
let mut configure_cmd = command(src_dir.join("configure"));
Expand Down
8 changes: 8 additions & 0 deletions src/bootstrap/src/core/config/toml/rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,14 @@ impl Config {
lld_enabled = lld_enabled_toml;
std_features = std_features_toml;

if optimize_toml.as_ref().is_some_and(|v| matches!(v, RustOptimize::Bool(false))) {
eprintln!(
"WARNING: setting `optimize` to `false` is known to cause errors and \
should be considered unsupported. Refer to `bootstrap.example.toml` \
for more details."
);
}

optimize = optimize_toml;
self.rust_new_symbol_mangling = new_symbol_mangling;
set(&mut self.rust_optimize_tests, optimize_tests);
Expand Down
6 changes: 4 additions & 2 deletions src/ci/github-actions/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ runners:
os: windows-2022
<<: *base-job

# NOTE: windows-2025 has less disk space available than windows-2022,
# because the D drive is missing.
- &job-windows-25
os: windows-2025
<<: *base-job
Expand Down Expand Up @@ -542,13 +544,13 @@ auto:
env:
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-sanitizers --enable-profiler
SCRIPT: make ci-msvc-py
<<: *job-windows-25
<<: *job-windows

- name: x86_64-msvc-2
env:
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-sanitizers --enable-profiler
SCRIPT: make ci-msvc-ps1
<<: *job-windows-25
<<: *job-windows

# i686-msvc is split into two jobs to run tests in parallel.
- name: i686-msvc-1
Expand Down
15 changes: 0 additions & 15 deletions src/ci/scripts/install-rust.sh

This file was deleted.

112 changes: 9 additions & 103 deletions src/doc/rustc-dev-guide/.github/workflows/rustc-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,106 +9,12 @@ on:
jobs:
pull:
if: github.repository == 'rust-lang/rustc-dev-guide'
runs-on: ubuntu-latest
outputs:
pr_url: ${{ steps.update-pr.outputs.pr_url }}
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
# We need the full history for josh to work
fetch-depth: '0'
- name: Install stable Rust toolchain
run: rustup update stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: "josh-sync"
# Cache the josh directory with checked out rustc
cache-directories: "/home/runner/.cache/rustc-dev-guide-josh"
- name: Install josh
run: RUSTFLAGS="--cap-lints warn" cargo install josh-proxy --git https://github.com/josh-project/josh --tag r24.10.04
- name: Setup bot git name and email
run: |
git config --global user.name 'The rustc-dev-guide Cronjob Bot'
git config --global user.email 'github-actions@github.com'
- name: Perform rustc-pull
id: rustc-pull
# Turn off -e to disable early exit
shell: bash {0}
run: |
cargo run --manifest-path josh-sync/Cargo.toml -- rustc-pull
exitcode=$?

# If no pull was performed, we want to mark this job as successful,
# but we do not want to perform the follow-up steps.
if [ $exitcode -eq 0 ]; then
echo "pull_result=pull-finished" >> $GITHUB_OUTPUT
elif [ $exitcode -eq 2 ]; then
echo "pull_result=skipped" >> $GITHUB_OUTPUT
exitcode=0
fi

exit ${exitcode}
- name: Push changes to a branch
if: ${{ steps.rustc-pull.outputs.pull_result == 'pull-finished' }}
run: |
# Update a sticky branch that is used only for rustc pulls
BRANCH="rustc-pull"
git switch -c $BRANCH
git push -u origin $BRANCH --force
- name: Create pull request
id: update-pr
if: ${{ steps.rustc-pull.outputs.pull_result == 'pull-finished' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Check if an open pull request for an rustc pull update already exists
# If it does, the previous push has just updated it
# If not, we create it now
RESULT=`gh pr list --author github-actions[bot] --state open -q 'map(select(.title=="Rustc pull update")) | length' --json title`
if [[ "$RESULT" -eq 0 ]]; then
echo "Creating new pull request"
PR_URL=`gh pr create -B master --title 'Rustc pull update' --body 'Latest update from rustc.'`
echo "pr_url=$PR_URL" >> $GITHUB_OUTPUT
else
PR_URL=`gh pr list --author github-actions[bot] --state open -q 'map(select(.title=="Rustc pull update")) | .[0].url' --json url,title`
echo "Updating pull request ${PR_URL}"
echo "pr_url=$PR_URL" >> $GITHUB_OUTPUT
fi
send-zulip-message:
needs: [pull]
if: ${{ !cancelled() }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Compute message
id: create-message
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [ "${{ needs.pull.result }}" == "failure" ]; then
WORKFLOW_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
echo "message=Rustc pull sync failed. Check out the [workflow URL]($WORKFLOW_URL)." >> $GITHUB_OUTPUT
else
CREATED_AT=`gh pr list --author github-actions[bot] --state open -q 'map(select(.title=="Rustc pull update")) | .[0].createdAt' --json createdAt,title`
PR_URL=`gh pr list --author github-actions[bot] --state open -q 'map(select(.title=="Rustc pull update")) | .[0].url' --json url,title`
week_ago=$(date +%F -d '7 days ago')

# If there is an open PR that is at least a week old, post a message about it
if [[ -n $DATE_GH && $DATE_GH < $week_ago ]]; then
echo "message=A PR with a Rustc pull has been opened for more a week. Check out the [PR](${PR_URL})." >> $GITHUB_OUTPUT
fi
fi
- name: Send a Zulip message about updated PR
if: ${{ steps.create-message.outputs.message != '' }}
uses: zulip/github-actions-zulip/send-message@e4c8f27c732ba9bd98ac6be0583096dea82feea5
with:
api-key: ${{ secrets.ZULIP_API_TOKEN }}
email: "rustc-dev-guide-gha-notif-bot@rust-lang.zulipchat.com"
organization-url: "https://rust-lang.zulipchat.com"
to: 196385
type: "stream"
topic: "Subtree sync automation"
content: ${{ steps.create-message.outputs.message }}
uses: rust-lang/josh-sync/.github/workflows/rustc-pull.yml@main
with:
zulip-stream-id: 196385
zulip-bot-email: "rustc-dev-guide-gha-notif-bot@rust-lang.zulipchat.com"
pr-base-branch: master
branch-name: rustc-pull
secrets:
zulip-api-token: ${{ secrets.ZULIP_API_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
47 changes: 2 additions & 45 deletions src/doc/rustc-dev-guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,49 +72,6 @@ including the `<!-- toc -->` marker at the place where you want the TOC.

## Synchronizing josh subtree with rustc

This repository is linked to `rust-lang/rust` as a [josh](https://josh-project.github.io/josh/intro.html) subtree. You can use the following commands to synchronize the subtree in both directions.
This repository is linked to `rust-lang/rust` as a [josh](https://josh-project.github.io/josh/intro.html) subtree. You can use the [rustc-josh-sync](https://github.com/rust-lang/josh-sync) tool to perform synchronization.

You'll need to install `josh-proxy` locally via

```
cargo install josh-proxy --git https://github.com/josh-project/josh --tag r24.10.04
```
Older versions of `josh-proxy` may not round trip commits losslessly so it is important to install this exact version.

### Pull changes from `rust-lang/rust` into this repository

1) Checkout a new branch that will be used to create a PR into `rust-lang/rustc-dev-guide`
2) Run the pull command
```
cargo run --manifest-path josh-sync/Cargo.toml rustc-pull
```
3) Push the branch to your fork and create a PR into `rustc-dev-guide`

### Push changes from this repository into `rust-lang/rust`

NOTE: If you use Git protocol to push to your fork of `rust-lang/rust`,
ensure that you have this entry in your Git config,
else the 2 steps that follow would prompt for a username and password:

```
[url "git@github.com:"]
insteadOf = "https://github.com/"
```

1) Run the push command to create a branch named `<branch-name>` in a `rustc` fork under the `<gh-username>` account
```
cargo run --manifest-path josh-sync/Cargo.toml rustc-push <branch-name> <gh-username>
```
2) Create a PR from `<branch-name>` into `rust-lang/rust`

#### Minimal git config

For simplicity (ease of implementation purposes), the josh-sync script simply calls out to system git. This means that the git invocation may be influenced by global (or local) git configuration.

You may observe "Nothing to pull" even if you *know* rustc-pull has something to pull if your global git config sets `fetch.prunetags = true` (and possibly other configurations may cause unexpected outcomes).

To minimize the likelihood of this happening, you may wish to keep a separate *minimal* git config that *only* has `[user]` entries from global git config, then repoint system git to use the minimal git config instead. E.g.

```
GIT_CONFIG_GLOBAL=/path/to/minimal/gitconfig GIT_CONFIG_SYSTEM='' cargo run --manifest-path josh-sync/Cargo.toml -- rustc-pull
```
You can find a guide on how to perform the synchronization [here](./src/external-repos.md#synchronizing-a-josh-subtree).
Loading
Loading