Skip to content

Merge compiletest directives to do with llvm versions - #160637

Open
WaffleLapkin wants to merge 5 commits into
rust-lang:mainfrom
WaffleLapkin:llvm-version-less-than-three
Open

WaffleLapkin wants to merge 5 commits into
rust-lang:mainfrom
WaffleLapkin:llvm-version-less-than-three

Conversation

@WaffleLapkin

@WaffleLapkin WaffleLapkin commented Aug 6, 2026 •

Copy link
Copy Markdown
Member

I got confused by min-llvm-version and max-llvm-major-version being different not only in min/max (-major).

... So I decided to refactor everything to just use semver version requirements (//@ llvm-version: <=22, etc). IMO this is much nicer.

r? @jieyouxu


  • I did not use an LLM to create a change in this PR.
  • I used an LLM to create a change in this PR, and I have explained below how it was used.

@rustbot

rustbot commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

compiletest directives have been modified. Please add or update docs for the
new or modified directive in src/doc/rustc-dev-guide/.

Some changes occurred in src/tools/compiletest

cc @jieyouxu

Some changes occurred in coverage tests.

cc @Zalathar

rustc-dev-guide is developed in its own repository. If possible, consider making this change to rust-lang/rustc-dev-guide instead.

cc @BoxyUwU, @tshepang

@rustbot rustbot added A-compiletest Area: The compiletest test runner A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc labels Aug 6, 2026
@rustbot

rustbot commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

jieyouxu is currently at their maximum review capacity.
They may take a while to respond.

@rustbot rustbot added F-explicit_tail_calls `#![feature(explicit_tail_calls)]` S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 6, 2026
@WaffleLapkin WaffleLapkin removed the F-explicit_tail_calls `#![feature(explicit_tail_calls)]` label Aug 6, 2026
assert_eq!(extract_llvm_version("9.0.1-rust-1.43.0-dev"), Version::new(9, 0, 1));
assert_eq!(extract_llvm_version("9.3.1-rust-1.43.0-dev"), Version::new(9, 3, 1));
assert_eq!(extract_llvm_version("10.0.0-rust"), Version::new(10, 0, 0));
// assert_eq!(extract_llvm_version("4.5.6git"), Version::new(4, 5, 6));

@WaffleLapkin WaffleLapkin Aug 6, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this an actual version string that llvm outputs? In that case I'll have to (partially?) revert the change to extract_llvm_version...

View changes since the review

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so, this was probably just trying to hedge against trailing random things

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately I take that back, I believe for certain LLVM builds, the version string can actually be NNN.N.Ngit, e.g. llvm/llvm-project#71742, in particular if the LLVM build isn't from rc/release tags?

@rust-log-analyzer

This comment has been minimized.

@WaffleLapkin
WaffleLapkin force-pushed the llvm-version-less-than-three branch from cfd0ca7 to 968a931 Compare August 6, 2026 13:27
@rustbot rustbot added the F-explicit_tail_calls `#![feature(explicit_tail_calls)]` label Aug 6, 2026
@WaffleLapkin WaffleLapkin removed the F-explicit_tail_calls `#![feature(explicit_tail_calls)]` label Aug 6, 2026
Comment on lines +220 to +228
- `llvm-version: cmp` — ignore if the LLVM version doesn't match the comparator; examples of comparators that can be used:
- `=22` — ignored if the LLVM major version does not match the given value
- `>=22` — ignored if the LLVM major version is less than the given value
- `<=22` — ignored if the LLVM major version is higher than the given major version
- `>=22, <=23` — ignored if the LLVM major version is outside the given range
- all of the above can specify minor and patch version too, `=22.1`, `<=22.1`, `>=22.1`
- for a full list see [`semver` crate documentation](https://docs.rs/semver/latest/semver/struct.Comparator.html)
- `system-llvm-version: cmp` — ignored if using a system LLVM and its version does not match the comparator; see above for examples of comparators
- `ignore-llvm-version: cmp` — ignored if LLVM version **matches** the comparator; see above for examples of comparators

@jieyouxu jieyouxu Aug 9, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussion (not necessarily for this PR, but): hm, right now, //@ edition uses the range literal format (e.g. 2015..2021. I think > et al. are entirely reasonable for //@ llvm-version or //@ system-llvm-version, just that edition would be a different syntax.

I almost wonder if we should just, change //@ edition to use >/</<=/>=? For edition, at the time it was added, there was just a need for a syntax, not necessarily married to ../..=.

View changes since the review

assert_eq!(extract_llvm_version("9.0.1-rust-1.43.0-dev"), Version::new(9, 0, 1));
assert_eq!(extract_llvm_version("9.3.1-rust-1.43.0-dev"), Version::new(9, 3, 1));
assert_eq!(extract_llvm_version("10.0.0-rust"), Version::new(10, 0, 0));
// assert_eq!(extract_llvm_version("4.5.6git"), Version::new(4, 5, 6));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately I take that back, I believe for certain LLVM builds, the version string can actually be NNN.N.Ngit, e.g. llvm/llvm-project#71742, in particular if the LLVM build isn't from rc/release tags?

Comment on lines 345 to 346
let config: Config = cfg().llvm_version("10.6.2").build();
assert!(!check_ignore(&config, "//@ exact-llvm-major-version: 10"));

@jieyouxu jieyouxu Aug 9, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: wait, does this test case actually still pass...?

View changes since the review

@jieyouxu

jieyouxu commented Aug 9, 2026 •

Copy link
Copy Markdown
Member

(The overall change def makes sense to me though)
@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 9, 2026
@rust-bors

This comment has been minimized.

Instead of having separate directives for major versions and whatnot,
just use the semver version requirement.
…vm-version`

If we don't want them to combine we should explicitly disallow them...
@WaffleLapkin
WaffleLapkin force-pushed the llvm-version-less-than-three branch from 968a931 to 27f9259 Compare September 30, 2026 13:35
@rustbot

rustbot commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-tidy failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
tmpfs           1.6G   12K  1.6G   1% /run/user/1001

biggest files in the working dir:
1838992 .
438424 ./.jjconflict-base-0
438420 ./.jjconflict-side-1
438396 ./.jjconflict-side-0
210292 ./tests
210208 ./.jjconflict-side-1/tests
210208 ./.jjconflict-base-0/tests
210184 ./.jjconflict-side-0/tests
168912 ./tests/ui
168900 ./.jjconflict-side-1/tests/ui
168900 ./.jjconflict-side-0/tests/ui
168900 ./.jjconflict-base-0/tests/ui
120312 ./.jjconflict-base-0/src
120308 ./src
120308 ./.jjconflict-side-1/src
120308 ./.jjconflict-side-0/src
90404 ./.jjconflict-base-0/src/tools
90400 ./src/tools
90400 ./.jjconflict-side-1/src/tools
90400 ./.jjconflict-side-0/src/tools
85228 ./.git
62472 ./library
62472 ./.jjconflict-side-1/library
62472 ./.jjconflict-side-0/library
62472 ./.jjconflict-base-0/library
51460 ./.git/objects
51452 ./.git/objects/pack
43816 ./compiler
43804 ./.jjconflict-side-1/compiler
43804 ./.jjconflict-side-0/compiler
43804 ./.jjconflict-base-0/compiler
36080 ./library/stdarch
36080 ./.jjconflict-side-1/library/stdarch
36080 ./.jjconflict-side-0/library/stdarch
36080 ./.jjconflict-base-0/library/stdarch
29172 ./.jjconflict-base-0/src/tools/clippy
29168 ./src/tools/clippy
29168 ./.jjconflict-side-1/src/tools/clippy
29168 ./.jjconflict-side-0/src/tools/clippy
28968 ./src/tools/rust-analyzer
28968 ./.jjconflict-side-1/src/tools/rust-analyzer
28968 ./.jjconflict-side-0/src/tools/rust-analyzer
28968 ./.jjconflict-base-0/src/tools/rust-analyzer
25664 ./src/tools/rust-analyzer/crates
25664 ./.jjconflict-side-1/src/tools/rust-analyzer/crates
25664 ./.jjconflict-side-0/src/tools/rust-analyzer/crates
25664 ./.jjconflict-base-0/src/tools/rust-analyzer/crates
24104 ./library/stdarch/crates
24104 ./.jjconflict-side-1/library/stdarch/crates
24104 ./.jjconflict-side-0/library/stdarch/crates
24104 ./.jjconflict-base-0/library/stdarch/crates
20436 ./library/stdarch/crates/core_arch
20436 ./.jjconflict-side-1/library/stdarch/crates/core_arch
20436 ./.jjconflict-side-0/library/stdarch/crates/core_arch
20436 ./.jjconflict-base-0/library/stdarch/crates/core_arch
20392 ./library/stdarch/crates/core_arch/src
20392 ./.jjconflict-side-1/library/stdarch/crates/core_arch/src
20392 ./.jjconflict-side-0/library/stdarch/crates/core_arch/src
20392 ./.jjconflict-base-0/library/stdarch/crates/core_arch/src
20048 ./src/tools/clippy/tests
20048 ./.jjconflict-side-1/src/tools/clippy/tests
20048 ./.jjconflict-side-0/src/tools/clippy/tests
20048 ./.jjconflict-base-0/src/tools/clippy/tests
17760 ./src/doc
17760 ./.jjconflict-side-1/src/doc
17760 ./.jjconflict-side-0/src/doc
17760 ./.jjconflict-base-0/src/doc
16380 ./tests/ui/parser
16380 ./.jjconflict-side-1/tests/ui/parser
16380 ./.jjconflict-side-0/tests/ui/parser
16380 ./.jjconflict-base-0/tests/ui/parser
16344 ./src/tools/miri
16344 ./.jjconflict-side-1/src/tools/miri
16344 ./.jjconflict-side-0/src/tools/miri
16344 ./.jjconflict-base-0/src/tools/miri
15712 ./src/tools/clippy/tests/ui
15712 ./.jjconflict-side-1/src/tools/clippy/tests/ui
15712 ./.jjconflict-side-0/src/tools/clippy/tests/ui
15712 ./.jjconflict-base-0/src/tools/clippy/tests/ui
14624 ./src/doc/rustc-dev-guide
14624 ./.jjconflict-side-1/src/doc/rustc-dev-guide
14624 ./.jjconflict-side-0/src/doc/rustc-dev-guide
14624 ./.jjconflict-base-0/src/doc/rustc-dev-guide
13308 ./src/doc/rustc-dev-guide/src
13308 ./.jjconflict-side-1/src/doc/rustc-dev-guide/src
13308 ./.jjconflict-side-0/src/doc/rustc-dev-guide/src
13308 ./.jjconflict-base-0/src/doc/rustc-dev-guide/src
12424 ./src/tools/rustfmt
12424 ./.jjconflict-side-1/src/tools/rustfmt
12424 ./.jjconflict-side-0/src/tools/rustfmt
12424 ./.jjconflict-base-0/src/tools/rustfmt
11528 ./library/stdarch/intrinsics_data
11528 ./.jjconflict-side-1/library/stdarch/intrinsics_data
11528 ./.jjconflict-side-0/library/stdarch/intrinsics_data
11528 ./.jjconflict-base-0/library/stdarch/intrinsics_data
10340 ./src/tools/rustfmt/tests
10340 ./.jjconflict-side-1/src/tools/rustfmt/tests
10340 ./.jjconflict-side-0/src/tools/rustfmt/tests
10340 ./.jjconflict-base-0/src/tools/rustfmt/tests
9936 ./src/doc/rustc-dev-guide/src/queries

---
1303812 ./src/llvm-project/llvm/test
724356 ./src/llvm-project/llvm/test/CodeGen
496948 ./src/llvm-project/clang
451656 ./.git
438424 ./.jjconflict-base-0
438420 ./.jjconflict-side-1
438396 ./.jjconflict-side-0
391572 ./src/llvm-project/clang/test
366428 ./.git/modules
365884 ./.git/modules/src
323736 ./src/tools
320504 ./.git/modules/src/llvm-project
311236 ./src/llvm-project/llvm/test/CodeGen/AMDGPU
298956 ./.git/modules/src/llvm-project/objects
298948 ./.git/modules/src/llvm-project/objects/pack
210292 ./tests
210208 ./.jjconflict-side-1/tests
210208 ./.jjconflict-base-0/tests
210184 ./.jjconflict-side-0/tests
181740 ./src/tools/rustc-perf
177256 ./src/llvm-project/llvm/test/MC
175972 ./src/tools/rustc-perf/collector
174412 ./src/llvm-project/llvm/test/tools
169952 ./src/llvm-project/clang/test/CodeGen
168912 ./tests/ui
168900 ./.jjconflict-side-1/tests/ui
168900 ./.jjconflict-side-0/tests/ui
168900 ./.jjconflict-base-0/tests/ui
165280 ./src/tools/rustc-perf/collector/compile-benchmarks
146000 ./src/llvm-project/llvm/lib
140528 ./src/llvm-project/llvm/test/Transforms
133188 ./src/llvm-project/llvm/test/CodeGen/X86
120312 ./.jjconflict-base-0/src
120308 ./.jjconflict-side-1/src
120308 ./.jjconflict-side-0/src
120116 ./src/llvm-project/clang/test/CodeGen/RISCV
115896 ./src/llvm-project/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated
99744 ./src/llvm-project/llvm/test/tools/llvm-mca
99304 ./src/llvm-project/libcxx
98908 ./src/llvm-project/lldb
96168 ./src/llvm-project/mlir
90404 ./.jjconflict-base-0/src/tools
90400 ./.jjconflict-side-1/src/tools
90400 ./.jjconflict-side-0/src/tools
83404 ./src/llvm-project/llvm/test/CodeGen/RISCV
80152 ./src/llvm-project/llvm/lib/Target
74668 ./src/llvm-project/llvm/test/MC/AMDGPU
74316 ./src/llvm-project/libcxx/test
68676 ./src/llvm-project/clang/test/OpenMP
64312 ./src/llvm-project/llvm/test/CodeGen/AArch64
63988 ./src/tools/rustc-perf/collector/compile-benchmarks/stm32f4-0.15.1
63952 ./src/tools/rustc-perf/collector/compile-benchmarks/stm32f4-0.15.1/src
63348 ./src/llvm-project/libcxx/test/std
63300 ./library
62472 ./.jjconflict-side-1/library
62472 ./.jjconflict-side-0/library
62472 ./.jjconflict-base-0/library
62468 ./src/llvm-project/clang/lib
57840 ./src/llvm-project/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy
55256 ./src/llvm-project/clang-tools-extra
54348 ./src/llvm-project/compiler-rt
53908 ./src/llvm-project/llvm/test/CodeGen/RISCV/rvv
---
49992 ./src/doc
45980 ./src/llvm-project/lldb/test
44476 ./src/llvm-project/llvm/test/MC/Disassembler
43816 ./compiler
43804 ./.jjconflict-side-1/compiler
43804 ./.jjconflict-side-0/compiler
43804 ./.jjconflict-base-0/compiler
41820 ./src/llvm-project/mlir/test
39392 ./src/llvm-project/lldb/test/API
38472 ./src/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel
38220 ./src/llvm-project/compiler-rt/test
38192 ./src/llvm-project/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy
37736 ./src/llvm-project/llvm/test/MC/Disassembler/AMDGPU
37312 ./src/llvm-project/llvm/test/CodeGen/AMDGPU/NextUseAnalysis
36108 ./.git/modules/src/tools
36080 ./library/stdarch
36080 ./.jjconflict-side-1/library/stdarch
36080 ./.jjconflict-side-0/library/stdarch
36080 ./.jjconflict-base-0/library/stdarch
35868 ./src/llvm-project/polly
34616 ./src/llvm-project/llvm/test/tools/llvm-mca/X86
34564 ./src/llvm-project/llvm/include
34012 ./src/llvm-project/llvm/include/llvm
33356 ./src/llvm-project/llvm/test/Analysis
---
    Uninstalling pip-24.0:
      Successfully uninstalled pip-24.0
Successfully installed pip-26.2.1
linting python files
/checkout/.jjconflict-base-0/compiler/rustc_codegen_gcc/tools/generate_intrinsics.py:3:8: F401 [*] `re` imported but unused
/checkout/.jjconflict-base-0/compiler/rustc_codegen_gcc/tools/generate_intrinsics.py:114:59: E703 [*] Statement ends with an unnecessary semicolon
/checkout/.jjconflict-base-0/compiler/rustc_codegen_gcc/tools/generate_intrinsics.py:115:57: E703 [*] Statement ends with an unnecessary semicolon
/checkout/.jjconflict-base-0/compiler/rustc_codegen_gcc/tools/generate_intrinsics.py:116:56: E703 [*] Statement ends with an unnecessary semicolon
/checkout/.jjconflict-side-0/compiler/rustc_codegen_gcc/tools/generate_intrinsics.py:3:8: F401 [*] `re` imported but unused
/checkout/.jjconflict-side-0/compiler/rustc_codegen_gcc/tools/generate_intrinsics.py:114:59: E703 [*] Statement ends with an unnecessary semicolon
/checkout/.jjconflict-side-0/compiler/rustc_codegen_gcc/tools/generate_intrinsics.py:115:57: E703 [*] Statement ends with an unnecessary semicolon
/checkout/.jjconflict-side-0/compiler/rustc_codegen_gcc/tools/generate_intrinsics.py:116:56: E703 [*] Statement ends with an unnecessary semicolon
/checkout/.jjconflict-side-1/compiler/rustc_codegen_gcc/tools/generate_intrinsics.py:3:8: F401 [*] `re` imported but unused
/checkout/.jjconflict-side-1/compiler/rustc_codegen_gcc/tools/generate_intrinsics.py:114:59: E703 [*] Statement ends with an unnecessary semicolon
/checkout/.jjconflict-side-1/compiler/rustc_codegen_gcc/tools/generate_intrinsics.py:115:57: E703 [*] Statement ends with an unnecessary semicolon
/checkout/.jjconflict-side-1/compiler/rustc_codegen_gcc/tools/generate_intrinsics.py:116:56: E703 [*] Statement ends with an unnecessary semicolon
Found 12 errors.
[*] 12 fixable with the `--fix` option.

python linting failed! Printing diff suggestions:
--- /checkout/.jjconflict-base-0/compiler/rustc_codegen_gcc/tools/generate_intrinsics.py
+++ /checkout/.jjconflict-base-0/compiler/rustc_codegen_gcc/tools/generate_intrinsics.py
@@ -1,6 +1,5 @@
 import json
 import os
-import re
 import sys
 import subprocess
 
@@ -111,9 +110,9 @@
             intrinsics[arch].sort(key=lambda x: (x[0], x[1]))
             out.write(f'{indent16}// {arch}\n')
             for entry in intrinsics[arch]:
-                llvm_name = entry[0].removeprefix("llvm.");
-                llvm_name = llvm_name.removeprefix(arch);
-                llvm_name = llvm_name.removeprefix(".");
+                llvm_name = entry[0].removeprefix("llvm.")
+                llvm_name = llvm_name.removeprefix(arch)
+                llvm_name = llvm_name.removeprefix(".")
                 if "_round_mask" in entry[1]:
                     out.write(f'{indent16}// [INVALID CONVERSION]: "{llvm_name}" => "{entry[1]}",\n')
                 else:

--- /checkout/.jjconflict-side-1/compiler/rustc_codegen_gcc/tools/generate_intrinsics.py
+++ /checkout/.jjconflict-side-1/compiler/rustc_codegen_gcc/tools/generate_intrinsics.py
@@ -1,6 +1,5 @@
 import json
 import os
-import re
 import sys
 import subprocess
 
@@ -111,9 +110,9 @@
             intrinsics[arch].sort(key=lambda x: (x[0], x[1]))
             out.write(f'{indent16}// {arch}\n')
             for entry in intrinsics[arch]:
-                llvm_name = entry[0].removeprefix("llvm.");
-                llvm_name = llvm_name.removeprefix(arch);
-                llvm_name = llvm_name.removeprefix(".");
+                llvm_name = entry[0].removeprefix("llvm.")
+                llvm_name = llvm_name.removeprefix(arch)
+                llvm_name = llvm_name.removeprefix(".")
                 if "_round_mask" in entry[1]:
                     out.write(f'{indent16}// [INVALID CONVERSION]: "{llvm_name}" => "{entry[1]}",\n')
                 else:

--- /checkout/.jjconflict-side-0/compiler/rustc_codegen_gcc/tools/generate_intrinsics.py
+++ /checkout/.jjconflict-side-0/compiler/rustc_codegen_gcc/tools/generate_intrinsics.py
@@ -1,6 +1,5 @@
 import json
 import os
-import re
 import sys
 import subprocess
 
@@ -111,9 +110,9 @@
             intrinsics[arch].sort(key=lambda x: (x[0], x[1]))
             out.write(f'{indent16}// {arch}\n')
             for entry in intrinsics[arch]:
-                llvm_name = entry[0].removeprefix("llvm.");
-                llvm_name = llvm_name.removeprefix(arch);
-                llvm_name = llvm_name.removeprefix(".");
+                llvm_name = entry[0].removeprefix("llvm.")
+                llvm_name = llvm_name.removeprefix(arch)
+                llvm_name = llvm_name.removeprefix(".")
                 if "_round_mask" in entry[1]:
                     out.write(f'{indent16}// [INVALID CONVERSION]: "{llvm_name}" => "{entry[1]}",\n')
                 else:

Would fix 12 errors.
rerun with `--bless` to apply ruff suggestions: `./x.py test tidy --extra-checks=py:lint --bless`
tidy [extra_checks:python_lint]: checks with external tool 'ruff' failed
tidy [extra_checks:python_lint]: FAIL
checking python file formatting
Would reformat: /checkout/.jjconflict-base-0/compiler/rustc_codegen_gcc/tools/check_intrinsics_duplicates.py
Would reformat: /checkout/.jjconflict-base-0/compiler/rustc_codegen_gcc/tools/generate_intrinsics.py
Would reformat: /checkout/.jjconflict-base-0/src/tools/clippy/util/versions.py
Would reformat: /checkout/.jjconflict-base-0/src/tools/miri/ci/scrape-targets.py
Would reformat: /checkout/.jjconflict-base-0/src/tools/miri/test-cargo-miri/run-test.py
Would reformat: /checkout/.jjconflict-side-0/compiler/rustc_codegen_gcc/tools/check_intrinsics_duplicates.py
Would reformat: /checkout/.jjconflict-side-0/compiler/rustc_codegen_gcc/tools/generate_intrinsics.py
Would reformat: /checkout/.jjconflict-side-0/src/tools/clippy/util/versions.py
Would reformat: /checkout/.jjconflict-side-0/src/tools/miri/ci/scrape-targets.py
Would reformat: /checkout/.jjconflict-side-0/src/tools/miri/test-cargo-miri/run-test.py
Would reformat: /checkout/.jjconflict-side-1/compiler/rustc_codegen_gcc/tools/check_intrinsics_duplicates.py
Would reformat: /checkout/.jjconflict-side-1/compiler/rustc_codegen_gcc/tools/generate_intrinsics.py
Would reformat: /checkout/.jjconflict-side-1/src/tools/clippy/util/versions.py
Would reformat: /checkout/.jjconflict-side-1/src/tools/miri/ci/scrape-targets.py
Would reformat: /checkout/.jjconflict-side-1/src/tools/miri/test-cargo-miri/run-test.py
15 files would be reformatted, 156 files already formatted

python formatting does not match! Printing diff:
--- /checkout/.jjconflict-base-0/compiler/rustc_codegen_gcc/tools/check_intrinsics_duplicates.py
+++ /checkout/.jjconflict-base-0/compiler/rustc_codegen_gcc/tools/check_intrinsics_duplicates.py
@@ -38,8 +38,10 @@
                 if line == "};":
                     # We're done!
                     if found == 0:
-                        print("No intrinsics found in manual code even though we found the "
-                            "marker... Aborting...")
+                        print(
+                            "No intrinsics found in manual code even though we found the "
+                            "marker... Aborting..."
+                        )
                         return 1
                     for error in errors:
                         print("ERROR => {}".format(error))
@@ -50,12 +52,17 @@
                 found += 1
                 if parts[1] in intrinsics_map:
                     if parts[3] != intrinsics_map[parts[1]]:
-                        print("Same intrinsics (`{}` at line {}) but different GCC "
+                        print(
+                            "Same intrinsics (`{}` at line {}) but different GCC "
                             "translations: `{}` != `{}`".format(
-                                parts[1], pos, intrinsics_map[parts[1]], parts[3]))
+                                parts[1], pos, intrinsics_map[parts[1]], parts[3]
+                            )
+                        )
                     else:
-                        errors.append("Duplicated intrinsics: `{}` at line {}. Please remove it "
-                            " from manual code".format(parts[1], pos))
+                        errors.append(
+                            "Duplicated intrinsics: `{}` at line {}. Please remove it "
+                            " from manual code".format(parts[1], pos)
+                        )
             # Weird but whatever...
             return 1 if len(errors) != 0 else 0
         pos += 1

--- /checkout/.jjconflict-base-0/compiler/rustc_codegen_gcc/tools/generate_intrinsics.py
+++ /checkout/.jjconflict-base-0/compiler/rustc_codegen_gcc/tools/generate_intrinsics.py
@@ -15,7 +15,11 @@
 def clone_repository(repo_name, path, repo_url, sub_paths):
     if os.path.exists(path):
         while True:
-            choice = input("There is already a `{}` folder, do you want to update it? [y/N]".format(path))
+            choice = input(
+                "There is already a `{}` folder, do you want to update it? [y/N]".format(
+                    path
+                )
+            )
             if choice == "" or choice.lower() == "n":
                 print("Skipping repository update.")
                 return
@@ -37,8 +41,8 @@
 
 
 def convert_to_string(content):
-    if content.__class__.__name__ == 'bytes':
-        return content.decode('utf-8')
+    if content.__class__.__name__ == "bytes":
+        return content.decode("utf-8")
     return content
 
 
@@ -109,17 +113,23 @@
 {indent8}{attribute} fn {arch}(name: &str,full_name:&str) -> &'static str {{
 {indent12}match name {{""")
             intrinsics[arch].sort(key=lambda x: (x[0], x[1]))
-            out.write(f'{indent16}// {arch}\n')
+            out.write(f"{indent16}// {arch}\n")
             for entry in intrinsics[arch]:
-                llvm_name = entry[0].removeprefix("llvm.");
-                llvm_name = llvm_name.removeprefix(arch);
-                llvm_name = llvm_name.removeprefix(".");
+                llvm_name = entry[0].removeprefix("llvm.")
+                llvm_name = llvm_name.removeprefix(arch)
+                llvm_name = llvm_name.removeprefix(".")
                 if "_round_mask" in entry[1]:
-                    out.write(f'{indent16}// [INVALID CONVERSION]: "{llvm_name}" => "{entry[1]}",\n')
+                    out.write(
+                        f'{indent16}// [INVALID CONVERSION]: "{llvm_name}" => "{entry[1]}",\n'
+                    )
                 else:
                     out.write(f'{indent16}"{llvm_name}" => "{entry[1]}",\n')
-            out.write(f'{indent16}_ => unimplemented!("***** unsupported LLVM intrinsic {{full_name}}"),\n')
-            out.write(f"{indent16}}}\n{indent12}}}\n{indent8}{arch}(name,full_name)\n{indent8}}}\n,")
+            out.write(
+                f'{indent16}_ => unimplemented!("***** unsupported LLVM intrinsic {{full_name}}"),\n'
+            )
+            out.write(
+                f"{indent16}}}\n{indent12}}}\n{indent8}{arch}(name,full_name)\n{indent8}}}\n,"
+            )
         out.write(f"""{indent4}_ => {{
 {indent8}match old_arch_res {{
 {indent8}ArchCheckResult::UnknownIntrinsic => unimplemented!("***** unsupported LLVM intrinsic {{full_name}}"),
@@ -146,6 +156,7 @@
     )
     update_intrinsics(llvm_path)
 
+
 # llvm-tblgen can be built with:
 #
 # mkdir llvm-tblgen-build && cd llvm-tblgen-build

--- /checkout/.jjconflict-base-0/src/tools/clippy/util/versions.py
+++ /checkout/.jjconflict-base-0/src/tools/clippy/util/versions.py
@@ -5,9 +5,10 @@
 import os
 import sys
 
+
 def key(v):
     if v == "stable":
-        return sys.maxsize 
+        return sys.maxsize
     if v == "beta":
         return sys.maxsize - 1
---
 
+
 def main():
     parser = argparse.ArgumentParser()
-    parser.add_argument("input", help="path to the versions.html template", type=argparse.FileType("r"))
+    parser.add_argument(
+        "input", help="path to the versions.html template", type=argparse.FileType("r")
+    )
     parser.add_argument("outdir", help="path to write the output HTML")
     args = parser.parse_args()
 
-    versions = [
-        dir
-        for dir in os.listdir(args.outdir)
-        if key(dir) is not None
+    versions = [dir for dir in os.listdir(args.outdir) if key(dir) is not None]
+    versions.sort(key=key, reverse=True)
+    links = [
+        f'<a class="list-group-item" href="./{version}/index.html">{version}</a>'
+        for version in versions
     ]
-    versions.sort(key=key, reverse=True)
-    links = [f'<a class="list-group-item" href="./{version}/index.html">{version}</a>' for version in versions]
 
     template = Template(args.input.read())
     html = template.substitute(list="\n".join(links))
@@ -47,5 +50,6 @@
         out.write(html)
         print(f"wrote HTML to {path}")
 
+
 if __name__ == "__main__":
     main()

--- /checkout/.jjconflict-base-0/src/tools/miri/ci/scrape-targets.py
+++ /checkout/.jjconflict-base-0/src/tools/miri/ci/scrape-targets.py
@@ -1,7 +1,7 @@
 import sys
 from bs4 import BeautifulSoup
 
-html = open(sys.argv[1], 'r').read()
+html = open(sys.argv[1], "r").read()
 soup = BeautifulSoup(html, features="html.parser")
 # The tables are:
 # Tier 1                    <-- this is already checked by main CI, so we ignore it here
@@ -9,7 +9,7 @@
 # Tier 2 without host tools <-- and also this
 # Tier 3
 for table in soup.find_all("table")[1:3]:
-    for row in table.find_all('tr'):
-        code = row.find('code')
+    for row in table.find_all("tr"):
+        code = row.find("code")
         if code is not None:
             print(code.text)

--- /checkout/.jjconflict-base-0/src/tools/miri/test-cargo-miri/run-test.py
+++ /checkout/.jjconflict-base-0/src/tools/miri/test-cargo-miri/run-test.py
@@ -1,9 +1,9 @@
 #!/usr/bin/env python3
-'''
+"""
 Test whether cargo-miri works properly.
---
@@ -12,17 +12,19 @@
 import sys
 import argparse
 
-CGREEN  = '\33[32m'
-CBOLD   = '\33[1m'
-CEND    = '\33[0m'
+CGREEN = "\33[32m"
+CBOLD = "\33[1m"
+CEND = "\33[0m"
 
 CARGO_EXTRA_FLAGS = os.environ.get("CARGO_EXTRA_FLAGS", "").split()
 
+
 def fail(msg):
     print("\nTEST FAIL: {}".format(msg))
     sys.exit(1)
 
-def cargo_miri(cmd, quiet = True, targets = None):
+
+def cargo_miri(cmd, quiet=True, targets=None):
     args = ["cargo", "miri", cmd] + CARGO_EXTRA_FLAGS
     if quiet:
         args += ["-q"]
@@ -35,15 +37,19 @@
 
     return args
 
+
 def normalize_stdout(str):
-    str = str.replace("src\\", "src/") # normalize paths across platforms
-    str = re.sub("\\b\\d+\\.\\d+s\\b", "$TIME", str) # the time keeps changing, obviously
+    str = str.replace("src\\", "src/")  # normalize paths across platforms
+    str = re.sub(
+        "\\b\\d+\\.\\d+s\\b", "$TIME", str
+    )  # the time keeps changing, obviously
     return str
 
+
 def check_output(actual, path, name):
     if ARGS.bless:
         # Write the output only if bless is set
-        open(path, mode='w').write(actual)
+        open(path, mode="w").write(actual)
         return True
     expected = open(path).read()
     if expected == actual:
@@ -56,7 +62,8 @@
     print(f"--- END diff {name} ---")
     return False
 
-def test(name, cmd, stdout_ref, stderr_ref, stdin=b'', env=None):
+
+def test(name, cmd, stdout_ref, stderr_ref, stdin=b"", env=None):
     if env is None:
         env = {}
     print("Testing {}...".format(name))
@@ -82,6 +89,7 @@
         return
     fail("exit code was {}".format(p.returncode))
 
+
 def test_no_rebuild(name, cmd, env=None):
     if env is None:
         env = {}
@@ -106,113 +114,174 @@
         print("--- END stderr ---")
         fail("Something was being rebuilt when it should not be (or we got no output)")
 
+
 def test_cargo_miri_run():
-    test("`cargo miri run` (no isolation)",
+    test(
+        "`cargo miri run` (no isolation)",
         cargo_miri("run"),
-        "run.default.stdout.ref", "run.default.stderr.ref",
-        stdin=b'12\n21\n',
+        "run.default.stdout.ref",
+        "run.default.stderr.ref",
+        stdin=b"12\n21\n",
         env={
-            'MIRIFLAGS': "-Zmiri-disable-isolation",
-            'MIRITESTVAR': "wrongval", # make sure the build.rs value takes precedence
+            "MIRIFLAGS": "-Zmiri-disable-isolation",
+            "MIRITESTVAR": "wrongval",  # make sure the build.rs value takes precedence
         },
     )
     # Special test: run it again *without* `-q` to make sure nothing is being rebuilt (Miri issue #1722)
-    test_no_rebuild("`cargo miri run` (no rebuild)",
+    test_no_rebuild(
+        "`cargo miri run` (no rebuild)",
         cargo_miri("run", quiet=False) + ["--", ""],
-        env={'MIRITESTVAR': "wrongval"}, # changing the env var causes a rebuild (re-runs build.rs),
-                                         # so keep it set
+        env={
+            "MIRITESTVAR": "wrongval"
+        },  # changing the env var causes a rebuild (re-runs build.rs),
+        # so keep it set
     )
     # This also covers passing arguments without `--`: Cargo will forward unused positional arguments to the program.
-    test("`cargo miri run` (with arguments and target)",
-        cargo_miri("run") + ["--bin", "cargo-miri-test", "hello world", '"hello world"', r'he\\llo\"world'],
-        "run.args.stdout.ref", "run.args.stderr.ref",
+    test(
+        "`cargo miri run` (with arguments and target)",
+        cargo_miri("run")
+        + [
+            "--bin",
+            "cargo-miri-test",
+            "hello world",
+            '"hello world"',
+            r"he\\llo\"world",
+        ],
+        "run.args.stdout.ref",
+        "run.args.stderr.ref",
     )
-    test("`cargo miri r` (subcrate, no isolation)",
+    test(
+        "`cargo miri r` (subcrate, no isolation)",
         cargo_miri("r") + ["-p", "subcrate"],
-        "run.subcrate.stdout.ref", "run.subcrate.stderr.ref",
-        env={'MIRIFLAGS': "-Zmiri-disable-isolation"},
+        "run.subcrate.stdout.ref",
+        "run.subcrate.stderr.ref",
+        env={"MIRIFLAGS": "-Zmiri-disable-isolation"},
     )
-    test("`cargo miri run` (custom target dir)",
+    test(
+        "`cargo miri run` (custom target dir)",
         # Attempt to confuse the argument parser.
-        cargo_miri("run") + ["--target-dir=custom-run", "--", "--target-dir=target/custom-run"],
-        "run.args.stdout.ref", "run.custom-target-dir.stderr.ref",
+        cargo_miri("run")
+        + ["--target-dir=custom-run", "--", "--target-dir=target/custom-run"],
+        "run.args.stdout.ref",
+        "run.custom-target-dir.stderr.ref",
     )
-    test("`cargo miri run` (test local crate detection)",
-         cargo_miri("run") + ["--package=test-local-crate-detection"],
-         "run.local_crate.stdout.ref", "run.local_crate.stderr.ref",
+    test(
+        "`cargo miri run` (test local crate detection)",
+        cargo_miri("run") + ["--package=test-local-crate-detection"],
+        "run.local_crate.stdout.ref",
+        "run.local_crate.stderr.ref",
     )
 
+
 def test_cargo_miri_test():
-    test("`cargo miri test`",
+    test(
+        "`cargo miri test`",
         cargo_miri("test"),
-        "test.default.stdout.ref", "test.empty.ref",
-        env={'MIRIFLAGS': "-Zmiri-seed=4242"},
+        "test.default.stdout.ref",
+        "test.empty.ref",
+        env={"MIRIFLAGS": "-Zmiri-seed=4242"},
     )
-    test("`cargo miri test` (no isolation, no doctests)",
-        cargo_miri("test") + ["--bins", "--tests"], # no `--lib`, we disabled that in `Cargo.toml`
-        "test.no-doc.stdout.ref", "test.empty.ref",
-        env={'MIRIFLAGS': "-Zmiri-disable-isolation"},
+    test(
+        "`cargo miri test` (no isolation, no doctests)",
+        cargo_miri("test")
+        + ["--bins", "--tests"],  # no `--lib`, we disabled that in `Cargo.toml`
+        "test.no-doc.stdout.ref",
+        "test.empty.ref",
+        env={"MIRIFLAGS": "-Zmiri-disable-isolation"},
     )
-    test("`cargo miri test` (with filter)",
+    test(
+        "`cargo miri test` (with filter)",
         cargo_miri("test") + ["--", "--format=pretty", "pl"],
-        "test.filter.stdout.ref", "test.empty.ref",
+        "test.filter.stdout.ref",
+        "test.empty.ref",
     )
-    test("`cargo miri test` (test target)",
+    test(
+        "`cargo miri test` (test target)",
         cargo_miri("test") + ["--test", "test", "--", "--format=pretty"],
-        "test.test-target.stdout.ref", "test.empty.ref",
+        "test.test-target.stdout.ref",
+        "test.empty.ref",
     )
-    test("`cargo miri test` (bin target)",
+    test(
+        "`cargo miri test` (bin target)",
         cargo_miri("test") + ["--bin", "cargo-miri-test", "--", "--format=pretty"],
-        "test.bin-target.stdout.ref", "test.empty.ref",
+        "test.bin-target.stdout.ref",
+        "test.empty.ref",
     )
-    test("`cargo miri t` (subcrate, no isolation)",
+    test(
+        "`cargo miri t` (subcrate, no isolation)",
         cargo_miri("t") + ["-p", "subcrate"],
         "test.subcrate.stdout.ref",
         "test.empty.ref",
-        env={'MIRIFLAGS': "-Zmiri-disable-isolation"},
+        env={"MIRIFLAGS": "-Zmiri-disable-isolation"},
     )
-    test("`cargo miri test` (entire workspace, no isolation)",
+    test(
+        "`cargo miri test` (entire workspace, no isolation)",
         cargo_miri("test") + ["--workspace"],
-        "test.workspace.stdout.ref", "test.workspace.stderr.ref",
-        env={'MIRIFLAGS': "-Zmiri-disable-isolation"},
+        "test.workspace.stdout.ref",
+        "test.workspace.stderr.ref",
+        env={"MIRIFLAGS": "-Zmiri-disable-isolation"},
     )
     # FIXME: test is disabled for cross-compiled targets because it fails to link.
     # Related to <https://github.com/rust-lang/cargo/issues/17200>.
-    if not os.environ.get('MIRI_TESTS_CROSS_COMPILED'):
-        test("`cargo miri test` (entire workspace, no isolation, host-config)",
-            cargo_miri("test") + ["--workspace", "-Ztarget-applies-to-host", "-Zhost-config"],
-            "test.workspace.stdout.ref", "test.workspace.stderr.ref",
-            env={'MIRIFLAGS': "-Zmiri-disable-isolation"},
+    if not os.environ.get("MIRI_TESTS_CROSS_COMPILED"):
+        test(
+            "`cargo miri test` (entire workspace, no isolation, host-config)",
+            cargo_miri("test")
+            + ["--workspace", "-Ztarget-applies-to-host", "-Zhost-config"],
+            "test.workspace.stdout.ref",
+            "test.workspace.stderr.ref",
+            env={"MIRIFLAGS": "-Zmiri-disable-isolation"},
         )
-    test("`cargo miri test` (custom target dir)",
+    test(
+        "`cargo miri test` (custom target dir)",
         cargo_miri("test") + ["--target-dir=custom-test"],
-        "test.default.stdout.ref", "test.empty.ref",
+        "test.default.stdout.ref",
+        "test.empty.ref",
     )
-    del os.environ["CARGO_TARGET_DIR"] # this overrides `build.target-dir` passed by `--config`, so unset it
-    test("`cargo miri test` (config-cli)",
-        cargo_miri("test") + ["--config=build.target-dir=\"config-cli\""],
-        "test.default.stdout.ref", "test.empty.ref",
+    del os.environ[
+        "CARGO_TARGET_DIR"
+    ]  # this overrides `build.target-dir` passed by `--config`, so unset it
+    test(
+        "`cargo miri test` (config-cli)",
+        cargo_miri("test") + ['--config=build.target-dir="config-cli"'],
+        "test.default.stdout.ref",
+        "test.empty.ref",
     )
     if ARGS.multi_target:
         test_cargo_miri_multi_target()
 
 
 def test_cargo_miri_multi_target():
-    test("`cargo miri test` (multiple targets)",
-        cargo_miri("test", targets = ["aarch64-unknown-linux-gnu", "s390x-unknown-linux-gnu"]),
-        "test.multiple_targets.stdout.ref", "test.empty.ref",
+    test(
+        "`cargo miri test` (multiple targets)",
+        cargo_miri(
+            "test", targets=["aarch64-unknown-linux-gnu", "s390x-unknown-linux-gnu"]
+        ),
+        "test.multiple_targets.stdout.ref",
+        "test.empty.ref",
     )
 
-args_parser = argparse.ArgumentParser(description='`cargo miri` testing')
-args_parser.add_argument('--target', help='the target to test')
-args_parser.add_argument('--bless', help='bless the reference files', action='store_true')
-args_parser.add_argument('--multi-target', help='run tests related to multiple targets', action='store_true')
+
+args_parser = argparse.ArgumentParser(description="`cargo miri` testing")
+args_parser.add_argument("--target", help="the target to test")
+args_parser.add_argument(
+    "--bless", help="bless the reference files", action="store_true"
+)
+args_parser.add_argument(
+    "--multi-target", help="run tests related to multiple targets", action="store_true"
+)
 ARGS = args_parser.parse_args()
 
 os.chdir(os.path.dirname(os.path.realpath(__file__)))
-os.environ["CARGO_TARGET_DIR"] = "target" # this affects the location of the target directory that we need to check
-os.environ["RUST_TEST_NOCAPTURE"] = "0" # this affects test output, so make sure it is not set
-os.environ["RUST_TEST_THREADS"] = "1" # avoid non-deterministic output due to concurrent test runs
+os.environ["CARGO_TARGET_DIR"] = (
+    "target"  # this affects the location of the target directory that we need to check
+)
+os.environ["RUST_TEST_NOCAPTURE"] = (
+    "0"  # this affects test output, so make sure it is not set
+)
+os.environ["RUST_TEST_THREADS"] = (
+    "1"  # avoid non-deterministic output due to concurrent test runs
+)
 
 target_str = " for target {}".format(ARGS.target) if ARGS.target else ""
 print(CGREEN + CBOLD + "## Running `cargo miri` tests{}".format(target_str) + CEND)

--- /checkout/.jjconflict-side-0/compiler/rustc_codegen_gcc/tools/check_intrinsics_duplicates.py
+++ /checkout/.jjconflict-side-0/compiler/rustc_codegen_gcc/tools/check_intrinsics_duplicates.py
@@ -38,8 +38,10 @@
                 if line == "};":
                     # We're done!
                     if found == 0:
-                        print("No intrinsics found in manual code even though we found the "
-                            "marker... Aborting...")
+                        print(
+                            "No intrinsics found in manual code even though we found the "
+                            "marker... Aborting..."
+                        )
                         return 1
                     for error in errors:
                         print("ERROR => {}".format(error))
@@ -50,12 +52,17 @@
                 found += 1
                 if parts[1] in intrinsics_map:
                     if parts[3] != intrinsics_map[parts[1]]:
-                        print("Same intrinsics (`{}` at line {}) but different GCC "
+                        print(
+                            "Same intrinsics (`{}` at line {}) but different GCC "
                             "translations: `{}` != `{}`".format(
-                                parts[1], pos, intrinsics_map[parts[1]], parts[3]))
+                                parts[1], pos, intrinsics_map[parts[1]], parts[3]
+                            )
+                        )
                     else:
-                        errors.append("Duplicated intrinsics: `{}` at line {}. Please remove it "
-                            " from manual code".format(parts[1], pos))
+                        errors.append(
+                            "Duplicated intrinsics: `{}` at line {}. Please remove it "
+                            " from manual code".format(parts[1], pos)
+                        )
             # Weird but whatever...
             return 1 if len(errors) != 0 else 0
         pos += 1

--- /checkout/.jjconflict-side-0/compiler/rustc_codegen_gcc/tools/generate_intrinsics.py
+++ /checkout/.jjconflict-side-0/compiler/rustc_codegen_gcc/tools/generate_intrinsics.py
@@ -15,7 +15,11 @@
 def clone_repository(repo_name, path, repo_url, sub_paths):
     if os.path.exists(path):
         while True:
-            choice = input("There is already a `{}` folder, do you want to update it? [y/N]".format(path))
+            choice = input(
+                "There is already a `{}` folder, do you want to update it? [y/N]".format(
+                    path
+                )
+            )
             if choice == "" or choice.lower() == "n":
                 print("Skipping repository update.")
                 return
@@ -37,8 +41,8 @@
 
 
 def convert_to_string(content):
-    if content.__class__.__name__ == 'bytes':
-        return content.decode('utf-8')
+    if content.__class__.__name__ == "bytes":
+        return content.decode("utf-8")
     return content
 
 
@@ -109,17 +113,23 @@
 {indent8}{attribute} fn {arch}(name: &str,full_name:&str) -> &'static str {{
 {indent12}match name {{""")
             intrinsics[arch].sort(key=lambda x: (x[0], x[1]))
-            out.write(f'{indent16}// {arch}\n')
+            out.write(f"{indent16}// {arch}\n")
             for entry in intrinsics[arch]:
-                llvm_name = entry[0].removeprefix("llvm.");
-                llvm_name = llvm_name.removeprefix(arch);
-                llvm_name = llvm_name.removeprefix(".");
+                llvm_name = entry[0].removeprefix("llvm.")
+                llvm_name = llvm_name.removeprefix(arch)
+                llvm_name = llvm_name.removeprefix(".")
                 if "_round_mask" in entry[1]:
-                    out.write(f'{indent16}// [INVALID CONVERSION]: "{llvm_name}" => "{entry[1]}",\n')
+                    out.write(
+                        f'{indent16}// [INVALID CONVERSION]: "{llvm_name}" => "{entry[1]}",\n'
+                    )
                 else:
                     out.write(f'{indent16}"{llvm_name}" => "{entry[1]}",\n')
-            out.write(f'{indent16}_ => unimplemented!("***** unsupported LLVM intrinsic {{full_name}}"),\n')
-            out.write(f"{indent16}}}\n{indent12}}}\n{indent8}{arch}(name,full_name)\n{indent8}}}\n,")
+            out.write(
+                f'{indent16}_ => unimplemented!("***** unsupported LLVM intrinsic {{full_name}}"),\n'
+            )
+            out.write(
+                f"{indent16}}}\n{indent12}}}\n{indent8}{arch}(name,full_name)\n{indent8}}}\n,"
+            )
         out.write(f"""{indent4}_ => {{
 {indent8}match old_arch_res {{
 {indent8}ArchCheckResult::UnknownIntrinsic => unimplemented!("***** unsupported LLVM intrinsic {{full_name}}"),
@@ -146,6 +156,7 @@
     )
     update_intrinsics(llvm_path)
 
+
 # llvm-tblgen can be built with:
 #
 # mkdir llvm-tblgen-build && cd llvm-tblgen-build

--- /checkout/.jjconflict-side-0/src/tools/clippy/util/versions.py
+++ /checkout/.jjconflict-side-0/src/tools/clippy/util/versions.py
@@ -5,9 +5,10 @@
 import os
 import sys
 
+
 def key(v):
     if v == "stable":
-        return sys.maxsize 
+        return sys.maxsize
     if v == "beta":
         return sys.maxsize - 1
---
 
+
 def main():
     parser = argparse.ArgumentParser()
-    parser.add_argument("input", help="path to the versions.html template", type=argparse.FileType("r"))
+    parser.add_argument(
+        "input", help="path to the versions.html template", type=argparse.FileType("r")
+    )
     parser.add_argument("outdir", help="path to write the output HTML")
     args = parser.parse_args()
 
-    versions = [
-        dir
-        for dir in os.listdir(args.outdir)
-        if key(dir) is not None
+    versions = [dir for dir in os.listdir(args.outdir) if key(dir) is not None]
+    versions.sort(key=key, reverse=True)
+    links = [
+        f'<a class="list-group-item" href="./{version}/index.html">{version}</a>'
+        for version in versions
     ]
-    versions.sort(key=key, reverse=True)
-    links = [f'<a class="list-group-item" href="./{version}/index.html">{version}</a>' for version in versions]
 
     template = Template(args.input.read())
     html = template.substitute(list="\n".join(links))
@@ -47,5 +50,6 @@
         out.write(html)
         print(f"wrote HTML to {path}")
 
+
 if __name__ == "__main__":
     main()

--- /checkout/.jjconflict-side-0/src/tools/miri/ci/scrape-targets.py
+++ /checkout/.jjconflict-side-0/src/tools/miri/ci/scrape-targets.py
@@ -1,7 +1,7 @@
 import sys
 from bs4 import BeautifulSoup
 
-html = open(sys.argv[1], 'r').read()
+html = open(sys.argv[1], "r").read()
 soup = BeautifulSoup(html, features="html.parser")
 # The tables are:
 # Tier 1                    <-- this is already checked by main CI, so we ignore it here
@@ -9,7 +9,7 @@
 # Tier 2 without host tools <-- and also this
 # Tier 3
 for table in soup.find_all("table")[1:3]:
-    for row in table.find_all('tr'):
-        code = row.find('code')
+    for row in table.find_all("tr"):
+        code = row.find("code")
         if code is not None:
             print(code.text)

--- /checkout/.jjconflict-side-0/src/tools/miri/test-cargo-miri/run-test.py
+++ /checkout/.jjconflict-side-0/src/tools/miri/test-cargo-miri/run-test.py
@@ -1,9 +1,9 @@
 #!/usr/bin/env python3
-'''
+"""
 Test whether cargo-miri works properly.
---
@@ -12,17 +12,19 @@
 import sys
 import argparse
 
-CGREEN  = '\33[32m'
-CBOLD   = '\33[1m'
-CEND    = '\33[0m'
+CGREEN = "\33[32m"
+CBOLD = "\33[1m"
+CEND = "\33[0m"
 
 CARGO_EXTRA_FLAGS = os.environ.get("CARGO_EXTRA_FLAGS", "").split()
 
+
 def fail(msg):
     print("\nTEST FAIL: {}".format(msg))
     sys.exit(1)
 
-def cargo_miri(cmd, quiet = True, targets = None):
+
+def cargo_miri(cmd, quiet=True, targets=None):
     args = ["cargo", "miri", cmd] + CARGO_EXTRA_FLAGS
     if quiet:
         args += ["-q"]
@@ -35,15 +37,19 @@
 
     return args
 
+
 def normalize_stdout(str):
-    str = str.replace("src\\", "src/") # normalize paths across platforms
-    str = re.sub("\\b\\d+\\.\\d+s\\b", "$TIME", str) # the time keeps changing, obviously
+    str = str.replace("src\\", "src/")  # normalize paths across platforms
+    str = re.sub(
+        "\\b\\d+\\.\\d+s\\b", "$TIME", str
+    )  # the time keeps changing, obviously
     return str
 
+
 def check_output(actual, path, name):
     if ARGS.bless:
         # Write the output only if bless is set
-        open(path, mode='w').write(actual)
+        open(path, mode="w").write(actual)
         return True
     expected = open(path).read()
     if expected == actual:
@@ -56,7 +62,8 @@
     print(f"--- END diff {name} ---")
     return False
 
-def test(name, cmd, stdout_ref, stderr_ref, stdin=b'', env=None):
+
+def test(name, cmd, stdout_ref, stderr_ref, stdin=b"", env=None):
     if env is None:
         env = {}
     print("Testing {}...".format(name))
@@ -82,6 +89,7 @@
         return
     fail("exit code was {}".format(p.returncode))
 
+
 def test_no_rebuild(name, cmd, env=None):
     if env is None:
         env = {}
@@ -106,113 +114,174 @@
         print("--- END stderr ---")
         fail("Something was being rebuilt when it should not be (or we got no output)")
 
+
 def test_cargo_miri_run():
-    test("`cargo miri run` (no isolation)",
+    test(
+        "`cargo miri run` (no isolation)",
         cargo_miri("run"),
-        "run.default.stdout.ref", "run.default.stderr.ref",
-        stdin=b'12\n21\n',
+        "run.default.stdout.ref",
+        "run.default.stderr.ref",
+        stdin=b"12\n21\n",
         env={
-            'MIRIFLAGS': "-Zmiri-disable-isolation",
-            'MIRITESTVAR': "wrongval", # make sure the build.rs value takes precedence
+            "MIRIFLAGS": "-Zmiri-disable-isolation",
+            "MIRITESTVAR": "wrongval",  # make sure the build.rs value takes precedence
         },
     )
     # Special test: run it again *without* `-q` to make sure nothing is being rebuilt (Miri issue #1722)
-    test_no_rebuild("`cargo miri run` (no rebuild)",
+    test_no_rebuild(
+        "`cargo miri run` (no rebuild)",
         cargo_miri("run", quiet=False) + ["--", ""],
-        env={'MIRITESTVAR': "wrongval"}, # changing the env var causes a rebuild (re-runs build.rs),
-                                         # so keep it set
+        env={
+            "MIRITESTVAR": "wrongval"
+        },  # changing the env var causes a rebuild (re-runs build.rs),
+        # so keep it set
     )
     # This also covers passing arguments without `--`: Cargo will forward unused positional arguments to the program.
-    test("`cargo miri run` (with arguments and target)",
-        cargo_miri("run") + ["--bin", "cargo-miri-test", "hello world", '"hello world"', r'he\\llo\"world'],
-        "run.args.stdout.ref", "run.args.stderr.ref",
+    test(
+        "`cargo miri run` (with arguments and target)",
+        cargo_miri("run")
+        + [
+            "--bin",
+            "cargo-miri-test",
+            "hello world",
+            '"hello world"',
+            r"he\\llo\"world",
+        ],
+        "run.args.stdout.ref",
+        "run.args.stderr.ref",
     )
-    test("`cargo miri r` (subcrate, no isolation)",
+    test(
+        "`cargo miri r` (subcrate, no isolation)",
         cargo_miri("r") + ["-p", "subcrate"],
-        "run.subcrate.stdout.ref", "run.subcrate.stderr.ref",
-        env={'MIRIFLAGS': "-Zmiri-disable-isolation"},
+        "run.subcrate.stdout.ref",
+        "run.subcrate.stderr.ref",
+        env={"MIRIFLAGS": "-Zmiri-disable-isolation"},
     )
-    test("`cargo miri run` (custom target dir)",
+    test(
+        "`cargo miri run` (custom target dir)",
         # Attempt to confuse the argument parser.
-        cargo_miri("run") + ["--target-dir=custom-run", "--", "--target-dir=target/custom-run"],
-        "run.args.stdout.ref", "run.custom-target-dir.stderr.ref",
+        cargo_miri("run")
+        + ["--target-dir=custom-run", "--", "--target-dir=target/custom-run"],
+        "run.args.stdout.ref",
+        "run.custom-target-dir.stderr.ref",
     )
-    test("`cargo miri run` (test local crate detection)",
-         cargo_miri("run") + ["--package=test-local-crate-detection"],
-         "run.local_crate.stdout.ref", "run.local_crate.stderr.ref",
+    test(
+        "`cargo miri run` (test local crate detection)",
+        cargo_miri("run") + ["--package=test-local-crate-detection"],
+        "run.local_crate.stdout.ref",
+        "run.local_crate.stderr.ref",
     )
 
+
 def test_cargo_miri_test():
-    test("`cargo miri test`",
+    test(
+        "`cargo miri test`",
         cargo_miri("test"),
-        "test.default.stdout.ref", "test.empty.ref",
-        env={'MIRIFLAGS': "-Zmiri-seed=4242"},
+        "test.default.stdout.ref",
+        "test.empty.ref",
+        env={"MIRIFLAGS": "-Zmiri-seed=4242"},
     )
-    test("`cargo miri test` (no isolation, no doctests)",
-        cargo_miri("test") + ["--bins", "--tests"], # no `--lib`, we disabled that in `Cargo.toml`
-        "test.no-doc.stdout.ref", "test.empty.ref",
-        env={'MIRIFLAGS': "-Zmiri-disable-isolation"},
+    test(
+        "`cargo miri test` (no isolation, no doctests)",
+        cargo_miri("test")
+        + ["--bins", "--tests"],  # no `--lib`, we disabled that in `Cargo.toml`
+        "test.no-doc.stdout.ref",
+        "test.empty.ref",
+        env={"MIRIFLAGS": "-Zmiri-disable-isolation"},
     )
-    test("`cargo miri test` (with filter)",
+    test(
+        "`cargo miri test` (with filter)",
         cargo_miri("test") + ["--", "--format=pretty", "pl"],
-        "test.filter.stdout.ref", "test.empty.ref",
+        "test.filter.stdout.ref",
+        "test.empty.ref",
     )
-    test("`cargo miri test` (test target)",
+    test(
+        "`cargo miri test` (test target)",
         cargo_miri("test") + ["--test", "test", "--", "--format=pretty"],
-        "test.test-target.stdout.ref", "test.empty.ref",
+        "test.test-target.stdout.ref",
+        "test.empty.ref",
     )
-    test("`cargo miri test` (bin target)",
+    test(
+        "`cargo miri test` (bin target)",
         cargo_miri("test") + ["--bin", "cargo-miri-test", "--", "--format=pretty"],
-        "test.bin-target.stdout.ref", "test.empty.ref",
+        "test.bin-target.stdout.ref",
+        "test.empty.ref",
     )
-    test("`cargo miri t` (subcrate, no isolation)",
+    test(
+        "`cargo miri t` (subcrate, no isolation)",
         cargo_miri("t") + ["-p", "subcrate"],
         "test.subcrate.stdout.ref",
         "test.empty.ref",
-        env={'MIRIFLAGS': "-Zmiri-disable-isolation"},
+        env={"MIRIFLAGS": "-Zmiri-disable-isolation"},
     )
-    test("`cargo miri test` (entire workspace, no isolation)",
+    test(
+        "`cargo miri test` (entire workspace, no isolation)",
         cargo_miri("test") + ["--workspace"],
-        "test.workspace.stdout.ref", "test.workspace.stderr.ref",
-        env={'MIRIFLAGS': "-Zmiri-disable-isolation"},
+        "test.workspace.stdout.ref",
+        "test.workspace.stderr.ref",
+        env={"MIRIFLAGS": "-Zmiri-disable-isolation"},
     )
     # FIXME: test is disabled for cross-compiled targets because it fails to link.
     # Related to <https://github.com/rust-lang/cargo/issues/17200>.
-    if not os.environ.get('MIRI_TESTS_CROSS_COMPILED'):
-        test("`cargo miri test` (entire workspace, no isolation, host-config)",
-            cargo_miri("test") + ["--workspace", "-Ztarget-applies-to-host", "-Zhost-config"],
-            "test.workspace.stdout.ref", "test.workspace.stderr.ref",
-            env={'MIRIFLAGS': "-Zmiri-disable-isolation"},
+    if not os.environ.get("MIRI_TESTS_CROSS_COMPILED"):
+        test(
+            "`cargo miri test` (entire workspace, no isolation, host-config)",
+            cargo_miri("test")
+            + ["--workspace", "-Ztarget-applies-to-host", "-Zhost-config"],
+            "test.workspace.stdout.ref",
+            "test.workspace.stderr.ref",
+            env={"MIRIFLAGS": "-Zmiri-disable-isolation"},
         )
-    test("`cargo miri test` (custom target dir)",
+    test(
+        "`cargo miri test` (custom target dir)",
         cargo_miri("test") + ["--target-dir=custom-test"],
-        "test.default.stdout.ref", "test.empty.ref",
+        "test.default.stdout.ref",
+        "test.empty.ref",
     )
-    del os.environ["CARGO_TARGET_DIR"] # this overrides `build.target-dir` passed by `--config`, so unset it
-    test("`cargo miri test` (config-cli)",
-        cargo_miri("test") + ["--config=build.target-dir=\"config-cli\""],
-        "test.default.stdout.ref", "test.empty.ref",
+    del os.environ[
+        "CARGO_TARGET_DIR"
+    ]  # this overrides `build.target-dir` passed by `--config`, so unset it
+    test(
+        "`cargo miri test` (config-cli)",
+        cargo_miri("test") + ['--config=build.target-dir="config-cli"'],
+        "test.default.stdout.ref",
+        "test.empty.ref",
     )
     if ARGS.multi_target:
         test_cargo_miri_multi_target()
 
 
 def test_cargo_miri_multi_target():
-    test("`cargo miri test` (multiple targets)",
-        cargo_miri("test", targets = ["aarch64-unknown-linux-gnu", "s390x-unknown-linux-gnu"]),
-        "test.multiple_targets.stdout.ref", "test.empty.ref",
+    test(
+        "`cargo miri test` (multiple targets)",
+        cargo_miri(
+            "test", targets=["aarch64-unknown-linux-gnu", "s390x-unknown-linux-gnu"]
+        ),
+        "test.multiple_targets.stdout.ref",
+        "test.empty.ref",
     )
 
-args_parser = argparse.ArgumentParser(description='`cargo miri` testing')
-args_parser.add_argument('--target', help='the target to test')
-args_parser.add_argument('--bless', help='bless the reference files', action='store_true')
-args_parser.add_argument('--multi-target', help='run tests related to multiple targets', action='store_true')
+
+args_parser = argparse.ArgumentParser(description="`cargo miri` testing")
+args_parser.add_argument("--target", help="the target to test")
+args_parser.add_argument(
+    "--bless", help="bless the reference files", action="store_true"
+)
+args_parser.add_argument(
+    "--multi-target", help="run tests related to multiple targets", action="store_true"
+)
 ARGS = args_parser.parse_args()
 
 os.chdir(os.path.dirname(os.path.realpath(__file__)))
-os.environ["CARGO_TARGET_DIR"] = "target" # this affects the location of the target directory that we need to check
-os.environ["RUST_TEST_NOCAPTURE"] = "0" # this affects test output, so make sure it is not set
-os.environ["RUST_TEST_THREADS"] = "1" # avoid non-deterministic output due to concurrent test runs
+os.environ["CARGO_TARGET_DIR"] = (
+    "target"  # this affects the location of the target directory that we need to check
+)
+os.environ["RUST_TEST_NOCAPTURE"] = (
+    "0"  # this affects test output, so make sure it is not set
+)
+os.environ["RUST_TEST_THREADS"] = (
+    "1"  # avoid non-deterministic output due to concurrent test runs
+)
 
 target_str = " for target {}".format(ARGS.target) if ARGS.target else ""
 print(CGREEN + CBOLD + "## Running `cargo miri` tests{}".format(target_str) + CEND)

--- /checkout/.jjconflict-side-1/compiler/rustc_codegen_gcc/tools/check_intrinsics_duplicates.py
+++ /checkout/.jjconflict-side-1/compiler/rustc_codegen_gcc/tools/check_intrinsics_duplicates.py
@@ -38,8 +38,10 @@
                 if line == "};":
                     # We're done!
                     if found == 0:
-                        print("No intrinsics found in manual code even though we found the "
-                            "marker... Aborting...")
+                        print(
+                            "No intrinsics found in manual code even though we found the "
+                            "marker... Aborting..."
+                        )
                         return 1
                     for error in errors:
                         print("ERROR => {}".format(error))
@@ -50,12 +52,17 @@
                 found += 1
                 if parts[1] in intrinsics_map:
                     if parts[3] != intrinsics_map[parts[1]]:
-                        print("Same intrinsics (`{}` at line {}) but different GCC "
+                        print(
+                            "Same intrinsics (`{}` at line {}) but different GCC "
                             "translations: `{}` != `{}`".format(
-                                parts[1], pos, intrinsics_map[parts[1]], parts[3]))
+                                parts[1], pos, intrinsics_map[parts[1]], parts[3]
+                            )
+                        )
                     else:
-                        errors.append("Duplicated intrinsics: `{}` at line {}. Please remove it "
-                            " from manual code".format(parts[1], pos))
+                        errors.append(
+                            "Duplicated intrinsics: `{}` at line {}. Please remove it "
+                            " from manual code".format(parts[1], pos)
+                        )
             # Weird but whatever...
             return 1 if len(errors) != 0 else 0
         pos += 1

--- /checkout/.jjconflict-side-1/compiler/rustc_codegen_gcc/tools/generate_intrinsics.py
+++ /checkout/.jjconflict-side-1/compiler/rustc_codegen_gcc/tools/generate_intrinsics.py
@@ -15,7 +15,11 @@
 def clone_repository(repo_name, path, repo_url, sub_paths):
     if os.path.exists(path):
         while True:
-            choice = input("There is already a `{}` folder, do you want to update it? [y/N]".format(path))
+            choice = input(
+                "There is already a `{}` folder, do you want to update it? [y/N]".format(
+                    path
+                )
+            )
             if choice == "" or choice.lower() == "n":
                 print("Skipping repository update.")
                 return
@@ -37,8 +41,8 @@
 
 
 def convert_to_string(content):
-    if content.__class__.__name__ == 'bytes':
-        return content.decode('utf-8')
+    if content.__class__.__name__ == "bytes":
+        return content.decode("utf-8")
     return content
 
 
@@ -109,17 +113,23 @@
 {indent8}{attribute} fn {arch}(name: &str,full_name:&str) -> &'static str {{
 {indent12}match name {{""")
             intrinsics[arch].sort(key=lambda x: (x[0], x[1]))
-            out.write(f'{indent16}// {arch}\n')
+            out.write(f"{indent16}// {arch}\n")
             for entry in intrinsics[arch]:
-                llvm_name = entry[0].removeprefix("llvm.");
-                llvm_name = llvm_name.removeprefix(arch);
-                llvm_name = llvm_name.removeprefix(".");
+                llvm_name = entry[0].removeprefix("llvm.")
+                llvm_name = llvm_name.removeprefix(arch)
+                llvm_name = llvm_name.removeprefix(".")
                 if "_round_mask" in entry[1]:
-                    out.write(f'{indent16}// [INVALID CONVERSION]: "{llvm_name}" => "{entry[1]}",\n')
+                    out.write(
+                        f'{indent16}// [INVALID CONVERSION]: "{llvm_name}" => "{entry[1]}",\n'
+                    )
                 else:
                     out.write(f'{indent16}"{llvm_name}" => "{entry[1]}",\n')
-            out.write(f'{indent16}_ => unimplemented!("***** unsupported LLVM intrinsic {{full_name}}"),\n')
-            out.write(f"{indent16}}}\n{indent12}}}\n{indent8}{arch}(name,full_name)\n{indent8}}}\n,")
+            out.write(
+                f'{indent16}_ => unimplemented!("***** unsupported LLVM intrinsic {{full_name}}"),\n'
+            )
+            out.write(
+                f"{indent16}}}\n{indent12}}}\n{indent8}{arch}(name,full_name)\n{indent8}}}\n,"
+            )
         out.write(f"""{indent4}_ => {{
 {indent8}match old_arch_res {{
 {indent8}ArchCheckResult::UnknownIntrinsic => unimplemented!("***** unsupported LLVM intrinsic {{full_name}}"),
@@ -146,6 +156,7 @@
     )
     update_intrinsics(llvm_path)
 
+
 # llvm-tblgen can be built with:
 #
 # mkdir llvm-tblgen-build && cd llvm-tblgen-build

--- /checkout/.jjconflict-side-1/src/tools/clippy/util/versions.py
+++ /checkout/.jjconflict-side-1/src/tools/clippy/util/versions.py
@@ -5,9 +5,10 @@
 import os
 import sys
 
+
 def key(v):
     if v == "stable":
-        return sys.maxsize 
+        return sys.maxsize
     if v == "beta":
         return sys.maxsize - 1
---
 
+
 def main():
     parser = argparse.ArgumentParser()
-    parser.add_argument("input", help="path to the versions.html template", type=argparse.FileType("r"))
+    parser.add_argument(
+        "input", help="path to the versions.html template", type=argparse.FileType("r")
+    )
     parser.add_argument("outdir", help="path to write the output HTML")
     args = parser.parse_args()
 
-    versions = [
-        dir
-        for dir in os.listdir(args.outdir)
-        if key(dir) is not None
+    versions = [dir for dir in os.listdir(args.outdir) if key(dir) is not None]
+    versions.sort(key=key, reverse=True)
+    links = [
+        f'<a class="list-group-item" href="./{version}/index.html">{version}</a>'
+        for version in versions
     ]
-    versions.sort(key=key, reverse=True)
-    links = [f'<a class="list-group-item" href="./{version}/index.html">{version}</a>' for version in versions]
 
     template = Template(args.input.read())
     html = template.substitute(list="\n".join(links))
@@ -47,5 +50,6 @@
         out.write(html)
         print(f"wrote HTML to {path}")
 
+
 if __name__ == "__main__":
     main()

--- /checkout/.jjconflict-side-1/src/tools/miri/ci/scrape-targets.py
+++ /checkout/.jjconflict-side-1/src/tools/miri/ci/scrape-targets.py
@@ -1,7 +1,7 @@
 import sys
 from bs4 import BeautifulSoup
 
-html = open(sys.argv[1], 'r').read()
+html = open(sys.argv[1], "r").read()
 soup = BeautifulSoup(html, features="html.parser")
 # The tables are:
 # Tier 1                    <-- this is already checked by main CI, so we ignore it here
@@ -9,7 +9,7 @@
 # Tier 2 without host tools <-- and also this
 # Tier 3
 for table in soup.find_all("table")[1:3]:
-    for row in table.find_all('tr'):
-        code = row.find('code')
+    for row in table.find_all("tr"):
+        code = row.find("code")
         if code is not None:
             print(code.text)

--- /checkout/.jjconflict-side-1/src/tools/miri/test-cargo-miri/run-test.py
+++ /checkout/.jjconflict-side-1/src/tools/miri/test-cargo-miri/run-test.py
@@ -1,9 +1,9 @@
 #!/usr/bin/env python3
-'''
+"""
 Test whether cargo-miri works properly.
---
@@ -12,17 +12,19 @@
 import sys
 import argparse
 
-CGREEN  = '\33[32m'
-CBOLD   = '\33[1m'
-CEND    = '\33[0m'
+CGREEN = "\33[32m"
+CBOLD = "\33[1m"
+CEND = "\33[0m"
 
 CARGO_EXTRA_FLAGS = os.environ.get("CARGO_EXTRA_FLAGS", "").split()
 
+
 def fail(msg):
     print("\nTEST FAIL: {}".format(msg))
     sys.exit(1)
 
-def cargo_miri(cmd, quiet = True, targets = None):
+
+def cargo_miri(cmd, quiet=True, targets=None):
     args = ["cargo", "miri", cmd] + CARGO_EXTRA_FLAGS
     if quiet:
         args += ["-q"]
@@ -35,15 +37,19 @@
 
     return args
 
+
 def normalize_stdout(str):
-    str = str.replace("src\\", "src/") # normalize paths across platforms
-    str = re.sub("\\b\\d+\\.\\d+s\\b", "$TIME", str) # the time keeps changing, obviously
+    str = str.replace("src\\", "src/")  # normalize paths across platforms
+    str = re.sub(
+        "\\b\\d+\\.\\d+s\\b", "$TIME", str
+    )  # the time keeps changing, obviously
     return str
 
+
 def check_output(actual, path, name):
     if ARGS.bless:
         # Write the output only if bless is set
-        open(path, mode='w').write(actual)
+        open(path, mode="w").write(actual)
         return True
     expected = open(path).read()
     if expected == actual:
@@ -56,7 +62,8 @@
     print(f"--- END diff {name} ---")
     return False
 
-def test(name, cmd, stdout_ref, stderr_ref, stdin=b'', env=None):
+
+def test(name, cmd, stdout_ref, stderr_ref, stdin=b"", env=None):
     if env is None:
         env = {}
     print("Testing {}...".format(name))
@@ -82,6 +89,7 @@
         return
     fail("exit code was {}".format(p.returncode))
 
+
 def test_no_rebuild(name, cmd, env=None):
     if env is None:
         env = {}
@@ -106,113 +114,174 @@
         print("--- END stderr ---")
         fail("Something was being rebuilt when it should not be (or we got no output)")
 
+
 def test_cargo_miri_run():
-    test("`cargo miri run` (no isolation)",
+    test(
+        "`cargo miri run` (no isolation)",
         cargo_miri("run"),
-        "run.default.stdout.ref", "run.default.stderr.ref",
-        stdin=b'12\n21\n',
+        "run.default.stdout.ref",
+        "run.default.stderr.ref",
+        stdin=b"12\n21\n",
         env={
-            'MIRIFLAGS': "-Zmiri-disable-isolation",
-            'MIRITESTVAR': "wrongval", # make sure the build.rs value takes precedence
+            "MIRIFLAGS": "-Zmiri-disable-isolation",
+            "MIRITESTVAR": "wrongval",  # make sure the build.rs value takes precedence
         },
     )
     # Special test: run it again *without* `-q` to make sure nothing is being rebuilt (Miri issue #1722)
-    test_no_rebuild("`cargo miri run` (no rebuild)",
+    test_no_rebuild(
+        "`cargo miri run` (no rebuild)",
         cargo_miri("run", quiet=False) + ["--", ""],
-        env={'MIRITESTVAR': "wrongval"}, # changing the env var causes a rebuild (re-runs build.rs),
-                                         # so keep it set
+        env={
+            "MIRITESTVAR": "wrongval"
+        },  # changing the env var causes a rebuild (re-runs build.rs),
+        # so keep it set
     )
     # This also covers passing arguments without `--`: Cargo will forward unused positional arguments to the program.
-    test("`cargo miri run` (with arguments and target)",
-        cargo_miri("run") + ["--bin", "cargo-miri-test", "hello world", '"hello world"', r'he\\llo\"world'],
-        "run.args.stdout.ref", "run.args.stderr.ref",
+    test(
+        "`cargo miri run` (with arguments and target)",
+        cargo_miri("run")
+        + [
+            "--bin",
+            "cargo-miri-test",
+            "hello world",
+            '"hello world"',
+            r"he\\llo\"world",
+        ],
+        "run.args.stdout.ref",
+        "run.args.stderr.ref",
     )
-    test("`cargo miri r` (subcrate, no isolation)",
+    test(
+        "`cargo miri r` (subcrate, no isolation)",
         cargo_miri("r") + ["-p", "subcrate"],
-        "run.subcrate.stdout.ref", "run.subcrate.stderr.ref",
-        env={'MIRIFLAGS': "-Zmiri-disable-isolation"},
+        "run.subcrate.stdout.ref",
+        "run.subcrate.stderr.ref",
+        env={"MIRIFLAGS": "-Zmiri-disable-isolation"},
     )
-    test("`cargo miri run` (custom target dir)",
+    test(
+        "`cargo miri run` (custom target dir)",
         # Attempt to confuse the argument parser.
-        cargo_miri("run") + ["--target-dir=custom-run", "--", "--target-dir=target/custom-run"],
-        "run.args.stdout.ref", "run.custom-target-dir.stderr.ref",
+        cargo_miri("run")
+        + ["--target-dir=custom-run", "--", "--target-dir=target/custom-run"],
+        "run.args.stdout.ref",
+        "run.custom-target-dir.stderr.ref",
     )
-    test("`cargo miri run` (test local crate detection)",
-         cargo_miri("run") + ["--package=test-local-crate-detection"],
-         "run.local_crate.stdout.ref", "run.local_crate.stderr.ref",
+    test(
+        "`cargo miri run` (test local crate detection)",
+        cargo_miri("run") + ["--package=test-local-crate-detection"],
+        "run.local_crate.stdout.ref",
+        "run.local_crate.stderr.ref",
     )
 
+
 def test_cargo_miri_test():
-    test("`cargo miri test`",
+    test(
+        "`cargo miri test`",
         cargo_miri("test"),
-        "test.default.stdout.ref", "test.empty.ref",
-        env={'MIRIFLAGS': "-Zmiri-seed=4242"},
+        "test.default.stdout.ref",
+        "test.empty.ref",
+        env={"MIRIFLAGS": "-Zmiri-seed=4242"},
     )
-    test("`cargo miri test` (no isolation, no doctests)",
-        cargo_miri("test") + ["--bins", "--tests"], # no `--lib`, we disabled that in `Cargo.toml`
-        "test.no-doc.stdout.ref", "test.empty.ref",
-        env={'MIRIFLAGS': "-Zmiri-disable-isolation"},
+    test(
+        "`cargo miri test` (no isolation, no doctests)",
+        cargo_miri("test")
+        + ["--bins", "--tests"],  # no `--lib`, we disabled that in `Cargo.toml`
+        "test.no-doc.stdout.ref",
+        "test.empty.ref",
+        env={"MIRIFLAGS": "-Zmiri-disable-isolation"},
     )
-    test("`cargo miri test` (with filter)",
+    test(
+        "`cargo miri test` (with filter)",
         cargo_miri("test") + ["--", "--format=pretty", "pl"],
-        "test.filter.stdout.ref", "test.empty.ref",
+        "test.filter.stdout.ref",
+        "test.empty.ref",
     )
-    test("`cargo miri test` (test target)",
+    test(
+        "`cargo miri test` (test target)",
         cargo_miri("test") + ["--test", "test", "--", "--format=pretty"],
-        "test.test-target.stdout.ref", "test.empty.ref",
+        "test.test-target.stdout.ref",
+        "test.empty.ref",
     )
-    test("`cargo miri test` (bin target)",
+    test(
+        "`cargo miri test` (bin target)",
         cargo_miri("test") + ["--bin", "cargo-miri-test", "--", "--format=pretty"],
-        "test.bin-target.stdout.ref", "test.empty.ref",
+        "test.bin-target.stdout.ref",
+        "test.empty.ref",
     )
-    test("`cargo miri t` (subcrate, no isolation)",
+    test(
+        "`cargo miri t` (subcrate, no isolation)",
         cargo_miri("t") + ["-p", "subcrate"],
         "test.subcrate.stdout.ref",
         "test.empty.ref",
-        env={'MIRIFLAGS': "-Zmiri-disable-isolation"},
+        env={"MIRIFLAGS": "-Zmiri-disable-isolation"},
     )
-    test("`cargo miri test` (entire workspace, no isolation)",
+    test(
+        "`cargo miri test` (entire workspace, no isolation)",
         cargo_miri("test") + ["--workspace"],
-        "test.workspace.stdout.ref", "test.workspace.stderr.ref",
-        env={'MIRIFLAGS': "-Zmiri-disable-isolation"},
+        "test.workspace.stdout.ref",
+        "test.workspace.stderr.ref",
+        env={"MIRIFLAGS": "-Zmiri-disable-isolation"},
     )
     # FIXME: test is disabled for cross-compiled targets because it fails to link.
     # Related to <https://github.com/rust-lang/cargo/issues/17200>.
-    if not os.environ.get('MIRI_TESTS_CROSS_COMPILED'):
-        test("`cargo miri test` (entire workspace, no isolation, host-config)",
-            cargo_miri("test") + ["--workspace", "-Ztarget-applies-to-host", "-Zhost-config"],
-            "test.workspace.stdout.ref", "test.workspace.stderr.ref",
-            env={'MIRIFLAGS': "-Zmiri-disable-isolation"},
+    if not os.environ.get("MIRI_TESTS_CROSS_COMPILED"):
+        test(
+            "`cargo miri test` (entire workspace, no isolation, host-config)",
+            cargo_miri("test")
+            + ["--workspace", "-Ztarget-applies-to-host", "-Zhost-config"],
+            "test.workspace.stdout.ref",
+            "test.workspace.stderr.ref",
+            env={"MIRIFLAGS": "-Zmiri-disable-isolation"},
         )
-    test("`cargo miri test` (custom target dir)",
+    test(
+        "`cargo miri test` (custom target dir)",
         cargo_miri("test") + ["--target-dir=custom-test"],
-        "test.default.stdout.ref", "test.empty.ref",
+        "test.default.stdout.ref",
+        "test.empty.ref",
     )
-    del os.environ["CARGO_TARGET_DIR"] # this overrides `build.target-dir` passed by `--config`, so unset it
-    test("`cargo miri test` (config-cli)",
-        cargo_miri("test") + ["--config=build.target-dir=\"config-cli\""],
-        "test.default.stdout.ref", "test.empty.ref",
+    del os.environ[
+        "CARGO_TARGET_DIR"
+    ]  # this overrides `build.target-dir` passed by `--config`, so unset it
+    test(
+        "`cargo miri test` (config-cli)",
+        cargo_miri("test") + ['--config=build.target-dir="config-cli"'],
+        "test.default.stdout.ref",
+        "test.empty.ref",
     )
     if ARGS.multi_target:
         test_cargo_miri_multi_target()
 
 
 def test_cargo_miri_multi_target():
-    test("`cargo miri test` (multiple targets)",
-        cargo_miri("test", targets = ["aarch64-unknown-linux-gnu", "s390x-unknown-linux-gnu"]),
-        "test.multiple_targets.stdout.ref", "test.empty.ref",
+    test(
+        "`cargo miri test` (multiple targets)",
+        cargo_miri(
+            "test", targets=["aarch64-unknown-linux-gnu", "s390x-unknown-linux-gnu"]
+        ),
+        "test.multiple_targets.stdout.ref",
+        "test.empty.ref",
     )
 
-args_parser = argparse.ArgumentParser(description='`cargo miri` testing')
-args_parser.add_argument('--target', help='the target to test')
-args_parser.add_argument('--bless', help='bless the reference files', action='store_true')
-args_parser.add_argument('--multi-target', help='run tests related to multiple targets', action='store_true')
+
+args_parser = argparse.ArgumentParser(description="`cargo miri` testing")
+args_parser.add_argument("--target", help="the target to test")
+args_parser.add_argument(
+    "--bless", help="bless the reference files", action="store_true"
+)
+args_parser.add_argument(
+    "--multi-target", help="run tests related to multiple targets", action="store_true"
+)
 ARGS = args_parser.parse_args()
 
 os.chdir(os.path.dirname(os.path.realpath(__file__)))
-os.environ["CARGO_TARGET_DIR"] = "target" # this affects the location of the target directory that we need to check
-os.environ["RUST_TEST_NOCAPTURE"] = "0" # this affects test output, so make sure it is not set
-os.environ["RUST_TEST_THREADS"] = "1" # avoid non-deterministic output due to concurrent test runs
+os.environ["CARGO_TARGET_DIR"] = (
+    "target"  # this affects the location of the target directory that we need to check
+)
+os.environ["RUST_TEST_NOCAPTURE"] = (
+    "0"  # this affects test output, so make sure it is not set
+)
+os.environ["RUST_TEST_THREADS"] = (
+    "1"  # avoid non-deterministic output due to concurrent test runs
+)
 
 target_str = " for target {}".format(ARGS.target) if ARGS.target else ""
 print(CGREEN + CBOLD + "## Running `cargo miri` tests{}".format(target_str) + CEND)

15 files would be reformatted, 156 files already formatted
rerun with `--bless` to reformat Python code: `./x.py test tidy --extra-checks=py:fmt --bless`
tidy [extra_checks:python_fmt]: checks with external tool 'ruff' failed
tidy [extra_checks:python_fmt]: FAIL
checking C++ file formatting
spellchecking files
building external tool typos from package typos-cli@1.38.1
finished building tool typos
yarn install v1.22.22
---
Running eslint on rustdoc JS files
info: ES-Check: checking 7 files...
info: ✓ ES-Check passed! All files are ES10 compatible.
typechecking javascript files
tidy: The following checks failed: extra_checks:python_fmt, extra_checks:python_lint
Bootstrap failed while executing `test src/tools/tidy tidyselftest --extra-checks=py,cpp,js,spellcheck`
Currently active steps:
test::Tidy {  } at src/bootstrap/src/core/build_steps/test.rs:1665
Command `/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools-bin/rust-tidy --root-path=/checkout --cargo-path=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo --output-dir=/checkout/obj/build --concurrency=4 --npm-path=/node/bin/yarn --ci=true --extra-checks=py,cpp,js,spellcheck` failed with exit code 1
Created at: src/bootstrap/src/core/build_steps/tool.rs:1627:23
Executed at: src/bootstrap/src/core/build_steps/test.rs:1747:29

Command has failed. Rerun with -v to see more details.
Build completed unsuccessfully in 0:02:54
  local time: Wed Sep 30 13:44:40 UTC 2026
  network time: Wed, 30 Sep 2026 13:44:40 GMT
##[error]Process completed with exit code 1.
##[group]Run echo "disk usage:"

@rust-bors

rust-bors Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #163680) made this pull request unmergeable. Please resolve the merge conflicts by rebasing.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-compiletest Area: The compiletest test runner A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants