Skip to content

Rollup of 8 pull requests #142003

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

Merged
merged 19 commits into from
Jun 4, 2025
Merged

Rollup of 8 pull requests #142003

merged 19 commits into from
Jun 4, 2025

Conversation

matthiaskrgr
Copy link
Member

@matthiaskrgr matthiaskrgr commented Jun 4, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

folkertdev and others added 19 commits May 19, 2025 17:40
Rust's 128-bit integers have historically been incompatible with C [1].
However, there have been a number of changes in Rust and LLVM that
mean this is no longer the case:

* Incorrect alignment of `i128` on x86 [1]: adjusting Rust's alignment
  proposed at rust-lang/compiler-team#683,
  implemented at rust-lang#116672.
* LLVM version of the above: resolved in LLVM, including ABI fix.
  Present in LLVM18 (our minimum supported version).
* Incorrect alignment of `i128` on 64-bit PowerPC, SPARC, and MIPS [2]:
  Rust's data layouts adjusted at
  rust-lang#132422,
  rust-lang#132741,
  rust-lang#134115.
* LLVM version of the above: done in LLVM 20
  llvm/llvm-project#102783.
* Incorrect return convention of `i128` on Windows: adjusted to match
  GCC and Clang at rust-lang#134290.

At [3], the lang team considered it acceptable to remove `i128` from
`improper_ctypes_definitions` if the LLVM version is known to be
compatible. Time has elapsed since then and we have dropped support for
LLVM versions that do not have the x86 fixes, meaning a per-llvm-version
lint should no longer be necessary. The PowerPC, SPARC, and MIPS changes
only came in LLVM 20 but since Rust's datalayouts have also been updated
to match, we will be using the correct alignment regardless of LLVM
version.

`repr(i128)` was added to this lint in [4], but is also removed here.

Part of the decision is that `i128` should match `__int128` in C on
platforms that provide it, which documentation is updated to indicate.
We will not guarantee that `i128` matches `_BitInt(128)` since that can
be different from `__int128`. Some platforms (usually 32-bit) do not
provide `__int128`; if any ABIs are extended in the future to define it,
we will need to make sure that our ABI matches.

Closes: rust-lang#134288
Closes: rust-lang#128950

[1]: rust-lang#54341
[2]: rust-lang#128950
[3]: rust-lang/lang-team#255 (comment)
[4]: rust-lang#138282
…tion

This allows for testing these tests on editions other than 2015
…actions

In particular:
- `Display` is not necessarily lossless
- The output of `Display` might not be parseable by `FromStr`, and might
  not produce the same value if it is.
- Calling `.parse()` on the output of `Display` is usually a mistake
  unless a type's documented output and input formats match.
- The input formats accepted by `FromStr` depend on the type.
- Drop the phrasing "usually a mistake".
- Mention that `Display` may not be lossless.
- Drop a misplaced parenthetical about round-tripping that didn't fit
  the paragraph it was in.
- Drop "usually a mistake"
- Add phrasing from `FromStr` about round-tripping, and about how the
  inability to round-trip may surprise users.
In StdLink::run we subsequently recursively copy the initial sysroot
lib directory into the stage0-sysroot lib directory.  If the initial
sysroot is a toolchain that includes the `rust-src` component (in
lib/rustlib/src/rust), if we add this symlink, that recursive copy
will overwrite the repo sources with the toolchain's sources.
…romstr-docs, r=Amanieu

Improve the documentation of `Display` and `FromStr`, and their interactions

In particular:
- `Display` is not necessarily lossless
- The output of `Display` might not be parseable by `FromStr`, and might
  not produce the same value if it is.
- Calling `.parse()` on the output of `Display` is usually a mistake
  unless a type's documented output and input formats match.
- The input formats accepted by `FromStr` depend on the type.

This documentation adds no API surface area and makes no guarantees about stability. To the best of my knowledge, everything it says is already established to be true. As such, I don't think it needs an FCP.
…-ctypes, r=traviscross,workingjubilee

Remove `i128` and `u128` from `improper_ctypes_definitions`

Rust's 128-bit integers have historically been incompatible with C [1]. However, there have been a number of changes in Rust and LLVM that mean this is no longer the case:

* Incorrect alignment of `i128` on x86 [1]: adjusting Rust's alignment proposed at rust-lang/compiler-team#683, implemented at rust-lang#116672.
* LLVM version of the above: resolved in LLVM, including ABI fix. Present in LLVM18 (our minimum supported version).
* Incorrect alignment of `i128` on 64-bit PowerPC, SPARC, and MIPS [2]: Rust's data layouts adjusted at rust-lang#132422, rust-lang#132741, rust-lang#134115.
* LLVM version of the above: done in LLVM 20 llvm/llvm-project#102783.
* Incorrect return convention of `i128` on Windows: adjusted to match GCC and Clang at rust-lang#134290.

At rust-lang/lang-team#255 (comment), the lang team considered it acceptable to remove `i128` from `improper_ctypes_definitions` if the LLVM version is known to be compatible. Time has elapsed since then and we have dropped support for LLVM versions that do not have the x86 fixes, meaning a per-llvm-version lint should no longer be necessary. The PowerPC, SPARC, and MIPS changes only came in LLVM 20 but since Rust's datalayouts have also been updated to match, we will be using the correct alignment regardless of LLVM version.

`repr(i128)` was added to this lint in rust-lang#138282, but is also removed here.

Part of the decision is that `i128` should match `__int128` in C on platforms that provide it, which documentation is updated to indicate. We will not guarantee that `i128` matches `_BitInt(128)` since that can be different from `__int128`. Some platforms (usually 32-bit) do not provide `__int128`; if any ABIs are extended in the future to define it, we will need to make sure that our ABI matches.

Closes: rust-lang#134288

[1]: rust-lang#54341
[2]: rust-lang#128950
…oieni

build dist for x86_64-pc-solaris and sparcv9-sun-solaris

try-job: dist-sparcv9-solaris
try-job: dist-x86_64-solaris
try-job: dist-various-2
try-job: dist-x86_64-illumos
…es, r=workingjubilee

add s390x z17 target features

tracking issue: rust-lang#130869

earlier target features were added in rust-lang#135630, and rust-lang#135413 (comment) has some extra context on these new features.

r? ``@ghost``
cc ``@uweigand``
…=Amanieu

make `OsString::new` and `PathBuf::new` unstably const

Since rust-lang#129041, `String::into_bytes` is `const`, which allows making `OsString::new` and `PathBuf::new` unstably const now.
Not sure what the exact process for this is; does it need an ACP?
index: add method for checking range on DenseBitSet

Micro-optimisation that Miri benefits from with the new isolated allocator for native-libs mode. Also possibly just a useful method to have on `DenseBitSet`
…015, r=compiler-errors

Use non-2015 edition paths in tests that do not test for their resolution

This allows for testing these tests on editions other than 2015
…ur-ozkan

bootstrap: don't symlink source dir into stage0 sysroot

In StdLink::run we subsequently recursively copy the initial sysroot lib directory into the stage0-sysroot lib directory.  If the initial sysroot is a toolchain that includes the `rust-src` component (in lib/rustlib/src/rust), if we add this symlink, that recursive copy will overwrite the repo sources with the toolchain's sources.

Fixes rust-lang#141991
@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-testsuite Area: The testsuite used to check the correctness of rustc 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. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Jun 4, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Jun 4, 2025

📌 Commit d31faac has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 4, 2025
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jun 4, 2025
@bors
Copy link
Collaborator

bors commented Jun 4, 2025

⌛ Testing commit d31faac with merge 61413ae...

@bors
Copy link
Collaborator

bors commented Jun 4, 2025

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 61413ae to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 4, 2025
@bors bors merged commit 61413ae into rust-lang:master Jun 4, 2025
11 checks passed
@rustbot rustbot added this to the 1.89.0 milestone Jun 4, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#136687 Improve the documentation of Display and FromStr, and t… 846763a866a030c47d041ffff1a9eb96b2ccc161 (link)
#137306 Remove i128 and u128 from improper_ctypes_definitions 61fd398419f523c21f979bc40417beaf3e2e2e85 (link)
#138699 build dist for x86_64-pc-solaris and sparcv9-sun-solaris 824208d2936a0214abb331e9fdaedbd4728555bd (link)
#141250 add s390x z17 target features 2ba8f0b638d8657ad317cfb9c3c15ef15571e0f5 (link)
#141467 make OsString::new and PathBuf::new unstably const 83808932451a4d00784ece135eeafa3d7256837e (link)
#141871 index: add method for checking range on DenseBitSet 367e05b6b4d1cec585ade830495fa1311e49d657 (link)
#141888 Use non-2015 edition paths in tests that do not test for th… 9886c20d37500fedf489732bd7718cf453c1093a (link)
#142000 bootstrap: don't symlink source dir into stage0 sysroot 0e5b934e05fef32bb598b518bf4a3fb3194e495e (link)

previous master: d9a7393638

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

Copy link
Contributor

github-actions bot commented Jun 4, 2025

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing d9a7393 (parent) -> 61413ae (this PR)

Test differences

Show 293 test diffs

Stage 1

  • bit_set::tests::dense_contains_any: [missing] -> pass (J0)

Additionally, 292 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 61413aea937d9663d01b62902535f8d4ec85cc95 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-x86_64-apple: 7523.3s -> 8709.4s (15.8%)
  2. x86_64-apple-2: 4755.8s -> 4203.2s (-11.6%)
  3. dist-various-2: 3359.2s -> 3089.3s (-8.0%)
  4. aarch64-apple: 5402.0s -> 5804.8s (7.5%)
  5. armhf-gnu: 4187.8s -> 4465.2s (6.6%)
  6. dist-armhf-linux: 4970.0s -> 4647.1s (-6.5%)
  7. dist-apple-various: 6434.9s -> 6847.9s (6.4%)
  8. arm-android: 5118.6s -> 5414.0s (5.8%)
  9. dist-ohos-x86_64: 4061.5s -> 4285.3s (5.5%)
  10. dist-ohos-aarch64: 4085.0s -> 4285.8s (4.9%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (61413ae): comparison URL.

Overall result: ❌✅ regressions and improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.4% [0.4%, 0.4%] 1
Improvements ✅
(primary)
-0.2% [-0.2%, -0.2%] 1
Improvements ✅
(secondary)
-0.2% [-0.3%, -0.1%] 2
All ❌✅ (primary) -0.2% [-0.2%, -0.2%] 1

Max RSS (memory usage)

Results (primary 1.8%, secondary -1.4%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
3.1% [1.6%, 4.7%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.0% [-1.0%, -1.0%] 1
Improvements ✅
(secondary)
-1.4% [-2.1%, -0.6%] 3
All ❌✅ (primary) 1.8% [-1.0%, 4.7%] 3

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 748.459s -> 749.479s (0.14%)
Artifact size: 371.85 MiB -> 371.89 MiB (0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.