Skip to content
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

Rollup of 10 pull requests #138873

Merged
merged 29 commits into from
Mar 24, 2025
Merged

Rollup of 10 pull requests #138873

merged 29 commits into from
Mar 24, 2025

Conversation

jhpratt
Copy link
Member

@jhpratt jhpratt commented Mar 24, 2025

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

heiseish and others added 29 commits March 17, 2025 19:30
If debuginfo has been requested in `config.toml`, it should be packaged
alongside the appropriate binary when running `x.py dist`.

Currently, this is only implemented for msvc environments where split
debuginfo is (basically) the only option. I've tested that this
correctly packages the `.pdb` for each binary in the various dist
packages.
We have codegen ones, but it looks like we could make those less flakey by just doing something better in the first place...
Computing the current dll path is somewhat expensive relative to other
work when compiling `fn main() {}` as `dladdr` needs to iterate over the
symbol table of librustc_driver.so until it finds a match.
They are marked with hidden visibility to prevent them from getting
exported, so we shouldn't ask the linker to export them anyway. The only
thing that does it cause a warning on macOS.
Otherwise the linker complains about EC symbols missing when compiling
for arm64ec.
hack: is_doc_subtype_of always returns true for TyAlias

it's worth noting that this function is only used in
the handling of "Methods from Deref", and we were previously
assuming all generic parameters were meaningless,
so this is still an improvment from the status quo.

this change means that we will have strictly less false positives
without adding any new false negitives.

Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
Uses `__`-named `doc(hidden)` methods instead.
Includes the following changes related to unordered atomics:

* Remove element_unordered_atomic intrinsics [1]
* Remove use of `atomic_load_unordered` and undefined behaviour [2]

There are a handful of other small changes, but nothing else
user-visible.

[1]: rust-lang/compiler-builtins#789
[2]: rust-lang/compiler-builtins#790
…m, r=Mark-Simulacrum

fix download-llvm logic for subtree sync branches

Fixes rust-lang#101907

Cc `@onur-ozkan`
r? `@Mark-Simulacrum`
…x, r=petrochenkov

Don't attempt to export compiler-builtins symbols from rust dylibs

They are marked with hidden visibility to prevent them from getting exported, so we shouldn't ask the linker to export them anyway. The only thing that does it cause a warning on macOS.

Part of rust-lang#136096

cc `@jyn514`
…lacrum

Simplify `PartialOrd` on tuples containing primitives

We noticed in rust-lang#133984 (comment) that currently the tuple comparison code, while it [does optimize down](https://github.com/rust-lang/rust/blob/master/tests/codegen/comparison-operators-2-tuple.rs) today, is kinda huge: <https://rust.godbolt.org/z/xqMoeYbhE>

This PR changes the tuple code to go through an overridable "chaining" version of the comparison functions, so that for simple things like `(i16, u16)` and `(f32, f32)` (as seen in the new MIR pre-codegen test) we just directly get the
```rust
if lhs.0 == rhs.0 { lhs.0 OP rhs.0 }
else { lhs.1 OP rhs.1 }
```
version in MIR, rather than emitting a mess for LLVM to have to clean up.

Test added in the first commit, so you can see the MIR diff in the second one.
…, r=onur-ozkan

[bootstrap] Distribute split debuginfo if present

If debuginfo has been requested in `config.toml`, it should be packaged alongside the appropriate binary when running `x.py dist`.

Currently, this is only implemented for msvc environments where split debuginfo is (basically) the only option. I've tested that this correctly packages the `.pdb` for each binary in the various dist packages.
…2, r=GuillaumeGomez

rustdoc: be more strict about "Methods from Deref"

fixes rust-lang#137083
fixes rust-lang#24686

Currently done:
* [x] fix `render_assoc_items_inner
* [x] fix sidebar logic
* [x] port test from rust-lang#137564
* [x] add test for sidebar items

Note that this does not yet fix the sidebar logic.
…imulacrum

Fix missing rustfmt in msi installer - cont

## Context
- This PR extended and fixed rust-lang#131365, which was reverted in rust-lang#135253
- Initial effort from `@klensy` in rust-lang#135255 (at any points if you feel like picking this up again, let me know I'll close my PR! Just trying to push this through since it's my mistake in the original commits)
- Tested with both `beta` and `nightly` `rust.channel`

r? `@Mark-Simulacrum`
Fix `FileType` `PartialEq` implementation on Windows

Fixes rust-lang#138668

On Windows the [`FileType`](https://doc.rust-lang.org/stable/std/fs/struct.FileType.html) struct was deriving `PartialEq` which in turn means it was doing a bit-for-bit comparison on the file attributes and reparse point. This is wrong because `attributes` may contain many things unrelated to file type.

`FileType` on Windows allows for four possible combinations (see also [`FileTypeExt`](https://doc.rust-lang.org/stable/std/os/windows/fs/trait.FileTypeExt.html)): `file`, `dir`, `symlink_file` and `symlink_dir`. So the new implementation makes sure both symlink and directory information match (and only those things).

This could be considered just a bug fix but it is a behaviour change so someone from libs-api might want to FCP this (or might not)...
Update `compiler-builtins` to 0.1.152

Includes the following changes related to unordered atomics:

* Remove element_unordered_atomic intrinsics [1]
* Remove use of `atomic_load_unordered` and undefined behaviour [2]

There are a handful of other small changes, but nothing else user-visible.

[1]: rust-lang/compiler-builtins#789
[2]: rust-lang/compiler-builtins#790
Cache current_dll_path output

Computing the current dll path is somewhat expensive relative to other work when compiling `fn main() {}` as `dladdr` needs to iterate over the symbol table of librustc_driver.so until it finds a match.
Tweaks to writeback and `Obligation -> Goal` conversion

Each of these commits are self-contained, but are prerequisites that I'd like to land before rust-lang#138845, which still needs some cleaning.

The ""most controversial"" one is probably [Explicitly don't fold coroutine obligations in writeback](rust-lang@e7d27ba), which I prefer because I think using `fold_predicate` to control against not normalizing predicates seems... easy to mess up 🤔, and we could have *other things* that we don't want to normalize.

Explicitly noting whether we want `resolve` to normalize is a lot clearer (and currently in writeback is limited to resolving stalled coroutine obligations), since we can attach it to a comment that explains *why*.
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 24, 2025
@rustbot rustbot added 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-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels Mar 24, 2025
@jhpratt
Copy link
Member Author

jhpratt commented Mar 24, 2025

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Mar 24, 2025

📌 Commit 0e95f96 has been approved by jhpratt

It is now in the queue for this repository.

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

bors commented Mar 24, 2025

⌛ Testing commit 0e95f96 with merge ae8ab87...

@bors
Copy link
Contributor

bors commented Mar 24, 2025

☀️ Test successful - checks-actions
Approved by: jhpratt
Pushing ae8ab87 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 24, 2025
@bors bors merged commit ae8ab87 into rust-lang:master Mar 24, 2025
7 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Mar 24, 2025
Copy link

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 7290b04 (parent) -> ae8ab87 (this PR)

Test differences

Show 219 test diffs
  • [mir-opt] tests/mir-opt/pre-codegen/tuple_ord.rs (stage 1): [missing] -> pass (J0)
  • [rustdoc] tests/rustdoc/deref/deref-methods-24686-target.rs (stage 1): [missing] -> pass (J0)
  • fs::tests::test_eq_windows_file_type (stage 1): [missing] -> pass (J1)
  • [rustdoc] tests/rustdoc/deref/deref-methods-24686-target.rs (stage 2): [missing] -> pass (J2)
  • [mir-opt] tests/mir-opt/pre-codegen/tuple_ord.rs (stage 2): [missing] -> pass (J3)

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

Job group index

  • J0: x86_64-gnu-llvm-18-3, x86_64-gnu-llvm-19-3
  • J1: i686-msvc-1, x86_64-mingw-1, x86_64-msvc-1
  • J2: aarch64-apple, aarch64-gnu, i686-gnu-1, i686-gnu-nopt-1, i686-msvc-1, x86_64-apple-2, x86_64-gnu, x86_64-gnu-llvm-18-1, x86_64-gnu-llvm-18-2, x86_64-gnu-llvm-19-1, x86_64-gnu-llvm-19-2, x86_64-gnu-nopt, x86_64-gnu-stable, x86_64-mingw-1, x86_64-msvc-1
  • J3: aarch64-apple, aarch64-gnu, arm-android, armhf-gnu, dist-i586-gnu-i586-i686-musl, i686-gnu-1, i686-gnu-nopt-1, i686-msvc-1, test-various, x86_64-apple-1, x86_64-gnu, x86_64-gnu-llvm-18-1, x86_64-gnu-llvm-18-2, x86_64-gnu-llvm-19-1, x86_64-gnu-llvm-19-2, x86_64-gnu-nopt, x86_64-gnu-stable, x86_64-mingw-1, x86_64-msvc-1

@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#137593 fix download-llvm logic for subtree sync branches a412ed4d185f2e808b26e6a363c93bcd51843388 (link)
#137736 Don't attempt to export compiler-builtins symbols from rust… 4b2f9888cde9da2a5fed65fc153e421ebbb1997a (link)
#138135 Simplify PartialOrd on tuples containing primitives 8115bc11ce1b8b3059bc200d7e0722d6aad3005b (link)
#138321 [bootstrap] Distribute split debuginfo if present 47092bb7367becab107da2a8d1b6e71ec54b0d00 (link)
#138574 rustdoc: be more strict about "Methods from Deref" dfc2d4efac07da0d22d7fc0d608a34f9cd802037 (link)
#138606 Fix missing rustfmt in msi installer - cont b4ca67009bf47a75a8d24c7bd7f3db547ae7da76 (link)
#138671 Fix FileType PartialEq implementation on Windows 536ef773a8c562622588310f72cbccdb3b0a1bb0 (link)
#138728 Update compiler-builtins to 0.1.152 7a9f249a7961e9aa33a7d243f8795be630a95bca (link)
#138783 Cache current_dll_path output 15072632821c752f24ac72c48f9b06ffb28bf45b (link)
#138846 Tweaks to writeback and Obligation -> Goal conversion 83d8b2596d64456d4482e69794cb1d1134615940 (link)

previous master: 7290b04b0a

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

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (ae8ab87): comparison URL.

Overall result: ✅ improvements - BENCHMARK(S) FAILED

@rustbot label: -perf-regression

❗ ❗ ❗ ❗ ❗
Warning ⚠️: The following benchmark(s) failed to build:

  • rustc

❗ ❗ ❗ ❗ ❗

cc @rust-lang/wg-compiler-performance

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.1% [0.1%, 0.1%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.2% [-4.3%, -0.2%] 20
Improvements ✅
(secondary)
-1.3% [-3.7%, -0.2%] 98
All ❌✅ (primary) -2.1% [-4.3%, 0.1%] 21

Max RSS (memory usage)

Results (primary -5.3%, secondary 1.2%)

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)
- - 0
Regressions ❌
(secondary)
2.5% [2.0%, 3.0%] 2
Improvements ✅
(primary)
-5.3% [-9.3%, -1.3%] 2
Improvements ✅
(secondary)
-1.5% [-1.5%, -1.5%] 1
All ❌✅ (primary) -5.3% [-9.3%, -1.3%] 2

Cycles

Results (primary -3.6%, secondary -2.6%)

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)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-3.6% [-4.5%, -2.7%] 2
Improvements ✅
(secondary)
-2.6% [-4.0%, -1.2%] 2
All ❌✅ (primary) -3.6% [-4.5%, -2.7%] 2

Binary size

Results (primary 0.1%)

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)
0.2% [0.1%, 0.4%] 7
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.1% [-0.2%, -0.0%] 6
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.1% [-0.2%, 0.4%] 13

Bootstrap: missing data
Artifact size: 365.54 MiB -> 365.48 MiB (-0.02%)

@workingjubilee
Copy link
Member

uh

@workingjubilee
Copy link
Member

...should we be concerned?

@jieyouxu
Copy link
Member

measure rustc

Caused by:
    0: building rustc
    1: expected success, got exit status: 1
       
       stderr=   Compiling proc-macro2 v1.0.89
          Compiling memchr v2.7.4
          Compiling unicode-ident v1.0.13
          Compiling typenum v1.17.0
          Compiling version_check v0.9.5
          Compiling libc v0.2.167
          Compiling shlex v1.3.0
          Compiling cc v1.1.22
          Compiling generic-array v0.14.7
          Compiling crossbeam-utils v0.8.20
          Compiling serde v1.0.215
          Compiling regex-syntax v0.8.5
          Compiling aho-corasick v1.1.3
          Compiling rustix v0.38.40
          Compiling quote v1.0.37
          Compiling syn v2.0.87
          Compiling pkg-config v0.3.31
          Compiling regex-automata v0.4.9
          Compiling cfg-if v1.0.0
          Compiling bitflags v2.6.0
          Compiling linux-raw-sys v0.4.14
          Compiling lzma-sys v0.1.20
          Compiling heck v0.5.0
          Compiling anstyle v1.0.10
          Compiling clap_lex v0.7.2
          Compiling crossbeam-epoch v0.9.18
          Compiling clap_builder v4.5.20
          Compiling block-buffer v0.10.4
          Compiling clap_derive v4.5.18
          Compiling crypto-common v0.1.6
          Compiling bstr v1.10.0
          Compiling serde_json v1.0.132
          Compiling same-file v1.0.6
          Compiling semver v1.0.23
          Compiling log v0.4.22
          Compiling walkdir v2.5.0
          Compiling globset v0.4.15
          Compiling digest v0.10.7
          Compiling serde_derive v1.0.215
          Compiling xattr v1.3.1
          Compiling crossbeam-deque v0.8.5
          Compiling filetime v0.2.25
          Compiling bootstrap v0.0.0 (/home/collector/rustc-perf/rust/src/bootstrap)
          Compiling ryu v1.0.18
          Compiling cpufeatures v0.2.15
          Compiling clap v4.5.20
          Compiling itoa v1.0.11
          Compiling sha2 v0.10.8
          Compiling clap_complete v4.5.37
          Compiling ignore v0.4.23
          Compiling tar v0.4.43
          Compiling opener v0.5.2
          Compiling toml v0.5.11
          Compiling fd-lock v4.0.2
          Compiling cmake v0.1.48
          Compiling object v0.36.5
          Compiling home v0.5.9
          Compiling termcolor v1.4.1
          Compiling xz2 v0.1.7
          Compiling build_helper v0.1.0 (/home/collector/rustc-perf/rust/src/build_helper)
           Finished `dev` profile [unoptimized] target(s) in 16.07s
       
       Your system's libstdc++ version is too old for the `llvm.download-ci-llvm` option.
       Current version detected: '7'
       Minimum required version: '8'
       Consider upgrading libstdc++ or disabling the `llvm.download-ci-llvm` option.
       If you choose to upgrade libstdc++, run `x clean` or delete `build/host/libcxx-version` manually after the upgrade.
       #=#=#                                                                         

                                                                           0.3%
                                                                           0.7%
#                                                                          2.1%
####                                                                       5.6%
#########                                                                 12.5%
##################                                                        26.3%
######################################                                    53.4%
######################################################################## 100.0%
       extracting /home/collector/rustc-perf/rust/build/cache/2025-02-18/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.xz to /home/collector/rustc-perf/rust/build/x86_64-unknown-linux-gnu/rustfmt
       #=#=#                                                                         

                                                                           0.0%
                                                                           0.0%
                                                                           0.1%
                                                                           0.2%
                                                                           0.4%
                                                                           0.8%
#                                                                          1.7%
##                                                                         3.5%
####                                                                       6.9%
########                                                                  12.1%
#########                                                                 12.8%
#########                                                                 12.8%
#########                                                                 12.8%
#########                                                                 12.9%
#########                                                                 13.0%
#########                                                                 13.2%
#########                                                                 13.6%
##########                                                                14.5%
###########                                                               16.3%
##############                                                            19.7%
#################                                                         24.8%
##################                                                        25.6%
##################                                                        25.6%
##################                                                        25.6%
##################                                                        25.7%
##################                                                        25.8%
##################                                                        26.0%
###################                                                       26.4%
###################                                                       27.3%
####################                                                      29.1%
#######################                                                   32.6%
###########################                                               37.7%
###########################                                               38.4%
###########################                                               38.4%
###########################                                               38.5%
###########################                                               38.5%
###########################                                               38.6%
###########################                                               38.8%
############################                                              39.3%
############################                                              40.1%
##############################                                            41.9%
################################                                          45.4%
####################################                                      50.6%
####################################                                      51.2%
####################################                                      51.2%
####################################                                      51.3%
####################################                                      51.3%
#####################################                                     51.4%
#####################################                                     51.6%
#####################################                                     52.1%
######################################                                    52.9%
#######################################                                   54.7%
#########################################                                 58.2%
#############################################                             63.2%
##############################################                            64.0%
##############################################                            64.0%
##############################################                            64.1%
##############################################                            64.1%
##############################################                            64.2%
##############################################                            64.4%
##############################################                            64.7%
###############################################                           65.5%
################################################                          67.0%
##################################################                        70.1%
######################################################                    75.3%
#######################################################                   76.8%
#######################################################                   76.8%
#######################################################                   76.9%
#######################################################                   76.9%
#######################################################                   77.0%
#######################################################                   77.2%
#######################################################                   77.7%
########################################################                  78.5%
#########################################################                 80.3%
############################################################              83.7%
################################################################          88.9%
################################################################          89.6%
################################################################          89.6%
################################################################          89.7%
################################################################          89.8%
################################################################          90.0%
#################################################################         90.5%
#################################################################         91.3%
###################################################################       93.1%
#####################################################################     96.6%
######################################################################## 100.0%
       extracting /home/collector/rustc-perf/rust/build/cache/2025-02-18/rustc-nightly-x86_64-unknown-linux-gnu.tar.xz to /home/collector/rustc-perf/rust/build/x86_64-unknown-linux-gnu/rustfmt
       usage: git rev-list [OPTION] <commit-id>... [ -- paths... ]
         limiting output:
           --max-count=<n>
           --max-age=<epoch>
           --min-age=<epoch>
           --sparse
           --no-merges
           --min-parents=<n>
           --no-min-parents
           --max-parents=<n>
           --no-max-parents
           --remove-empty
           --all
           --branches
           --tags
           --remotes
           --stdin
           --quiet
         ordering output:
           --topo-order
           --date-order
           --reverse
         formatting output:
           --parents
           --children
           --objects | --objects-edge
           --unpacked
           --header | --pretty
           --abbrev=<n> | --no-abbrev
           --abbrev-commit
           --left-right
           --count
         special purpose:
           --bisect
           --bisect-vars
           --bisect-all
       
       thread 'main' panicked at src/bootstrap/src/core/build_steps/llvm.rs:188:14:
       called `Result::unwrap()` on an `Err` value: "command did not execute successfully: cd \"/home/collector/rustc-perf/rust\" && \"git\" \"rev-list\" \"--author=bors@rust-lang.org\" \"-n1\" \"--diff-merges=first-parent\" \"HEAD\" \"--\" \"src/llvm-project\" \"src/bootstrap/download-ci-llvm-stamp\" \"src/version\"\nexpected success, got: exit status: 129\n"
       note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
       Building bootstrap
       Build completed unsuccessfully in 0:00:43
       
       
        stdout=WARNING: The `change-id` is missing in the `bootstrap.toml`. This means that you will not be able to track the major changes made to the bootstrap configurations.

@jhpratt jhpratt deleted the rollup-tggrbxl branch March 24, 2025 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.