Skip to content

Rollup of 10 pull requests #131775

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 20 commits into from
Oct 16, 2024
Merged

Rollup of 10 pull requests #131775

merged 20 commits into from
Oct 16, 2024

Conversation

Urgau
Copy link
Member

@Urgau Urgau commented Oct 16, 2024

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

practicalrs and others added 20 commits October 14, 2024 19:48
Other cell `into_inner` functions are const and there shouldn't be any
problem here. Make the unstable `LazyCell::into_inner` const under the
same gate as its stability (`lazy_cell_into_inner`).

Tracking issue: rust-lang#125623
…-readelf

[A recent commit in LLVM](llvm/llvm-project@ab930ee) modified the JSON output of LLVM. The LLVM change renamed "Notes" to "NoteSections" and inserted a new "Notes" key nested under each "NoteSection".

This change shores up exceptions around reading the JSON output of llvm-readelf and reads from "NoteSections" instead of the non-existent "Notes".
LLVM has added 3 new address spaces to support special Windows use
cases. These shouldn't trouble us for now, but LLVM requires matching
data layouts.

See llvm/llvm-project#111879 for details
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
Co-authored-by: Alex Crichton <alex@alexcrichton.com>
Co-authored-by: Kleis Auke Wolthuizen <github@kleisauke.nl>
…, r=jieyouxu

Add wasm32-unknown-emscripten platform support document

This PR adds the platform support document for wasm32-unknown-emscripten, and adds a warning about breaks in Emscripten ABI compatibility (see rust-lang#131467).

I mostly based the document off the wasm32-unknown-unknown docs and some of the information may still be missing (e.g. who's the target maintainer) or outdated (e.g. the build requirements). I still hope that it provides a good starting point.

r? `@workingjubilee`
…r=Urgau

Make fuchsia-test-runner.py compatible with new JSON output from llvm-readelf

[A recent commit in LLVM](llvm/llvm-project@ab930ee) modified the JSON output of LLVM. The LLVM change renamed "Notes" to "NoteSections" and inserted a new "Notes" key nested under each "NoteSection".

This change shores up exceptions around reading the JSON output of llvm-readelf and reads from "NoteSections" instead of the non-existent "Notes".

r? `@erickt`
…=celinval

Fix match_same_arms in stable_mir

Hi,

This PR fixes some clippy warnings

(Reopened rust-lang#131688)

```
warning: this match arm has an identical body to another arm
   --> compiler/stable_mir/src/mir/visit.rs:197:13
    |
197 | /             StatementKind::FakeRead(_, place) => {
198 | |                 self.visit_place(place, PlaceContext::NON_MUTATING, location);
199 | |             }
    | |_____________^
    |
    = help: try changing either arm body
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms
help: or try merging the arm patterns
    |
197 |             StatementKind::FakeRead(_, place) | StatementKind::PlaceMention(place) => {
    |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: and remove this obsolete arm
    |
209 -             StatementKind::PlaceMention(place) => {
210 -                 self.visit_place(place, PlaceContext::NON_MUTATING, location);
211 -             }
    |

```

Best regards,
Michal
…r, r=joboet

Mark the unstable LazyCell::into_inner const

Other cell `into_inner` functions are const and there shouldn't be any problem here. Make the unstable `LazyCell::into_inner` const under the same gate as its stability (`lazy_cell_into_inner`).

Tracking issue: rust-lang#125623
Relax a memory order in `once_box`

per rust-lang#131094 (comment).

In the successful path we don't need `Acquire` since we don't care if the store in `f()` happened in other threads has become visible to the current thread. We'll use our own results instead and just using `Release` to ensure other threads can see our store to `Box` when they fail the `compare_exchange` will suffice.

Also took https://marabos.nl/atomics/memory-ordering.html#example-lazy-initialization-with-indirection as a reference.

`@rustbot` label: +T-libs

r? `@ibraheemdev`
…nce, r=estebank

Don't report bivariance error when nesting a struct with field errors into another struct

We currently have logic to avoid reporting lifetime bivariance ("lifetime parameter ... is never used") errors when a struct has field resolution errors. However, this doesn't apply transitively. This PR implements a simple visitor to do so.

This was reported [here](https://twitter.com/fasterthanlime/status/1846257921086165033) since a `derive(Deserialize, Serialize)` ends up generating helper structs which have bivariant lifetimes due to containing the offending struct (that's being derived on).
llvm: Match aarch64 data layout to new LLVM layout

LLVM has added 3 new address spaces to support special Windows use cases. These shouldn't trouble us for now, but LLVM requires matching data layouts.

See llvm/llvm-project#111879 for details
Fix unnecessary nesting in run-make test output directories

Run-make tests were using `output_base_name` to determine their output directory, which results in a redundant subdirectory (e.g. `$build/test/run-make/<foo>/<foo>/`) because that method is intended to produce the name of an individual file.

The previous attempt to fix this double-nesting tried adding a special case in `output_base_dir`, which had the side-effect of breaking up-to-date checking for run-make tests, and had to be reverted in rust-lang#131681.

The fix is simply to call `output_base_dir` directory, which gives the desired directory without any redundant part.

r? jieyouxu
Add mailmap entry for my dev-desktop setup
Handle gracefully true/false in `cfg(target(..))` compact

This PR handles gracefully `true`/`false` in `cfg(target(..))` compact instead of ICE.

r? `@nnethercote`
Fixes rust-lang#131759
@rustbot rustbot added A-compiletest Area: The compiletest test runner A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-run-make Area: port run-make Makefiles to rmake.rs 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 Oct 16, 2024
@Urgau
Copy link
Member Author

Urgau commented Oct 16, 2024

@bors r+ rollup=never p=10

@bors
Copy link
Collaborator

bors commented Oct 16, 2024

📌 Commit e0e1e35 has been approved by Urgau

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 Oct 16, 2024
@bors
Copy link
Collaborator

bors commented Oct 16, 2024

⌛ Testing commit e0e1e35 with merge 0037048...

@bors
Copy link
Collaborator

bors commented Oct 16, 2024

☀️ Test successful - checks-actions
Approved by: Urgau
Pushing 0037048 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 16, 2024
@bors bors merged commit 0037048 into rust-lang:master Oct 16, 2024
7 checks passed
@rustbot rustbot added this to the 1.84.0 milestone Oct 16, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#131582 Add wasm32-unknown-emscripten platform support document 2bcdcc347012dfa4c8a135e7fef76a276d0b8dc6 (link)
#131694 Make fuchsia-test-runner.py compatible with new JSON output… 4c97e66e50ef210384908940cebab17297a95d95 (link)
#131700 Fix match_same_arms in stable_mir 9a76f9d75c92c23f03ad2b3be715203b0b356606 (link)
#131712 Mark the unstable LazyCell::into_inner const d1da239f59baed884abcd8a06346f2ae02c78d75 (link)
#131746 Relax a memory order in once_box 2d4415de498fab0a573fac10389d968189889b92 (link)
#131754 Don't report bivariance error when nesting a struct with fi… 307651f6f03a537bf92d95dcbf37873e39b7da26 (link)
#131760 llvm: Match aarch64 data layout to new LLVM layout c7f32d7744b7151b39c31e073e51be30f8dcb6ca (link)
#131764 Fix unnecessary nesting in run-make test output directories 25888a7c8e5847e4a4525fc662d0b603d576eaff (link)
#131766 Add mailmap entry for my dev-desktop setup 6a2e9a71762cea5f5cc829f19ad80206dbb60ba2 (link)
#131771 Handle gracefully true/false in cfg(target(..)) compact fbbc0df38f86971e9a86a75917a640aafb399ae8 (link)

previous master: d829780c4e

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 (0037048): comparison URL.

Overall result: ✅ 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
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.3% [-1.3%, -1.3%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -2.1%, secondary -3.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
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.1% [-2.1%, -2.1%] 1
Improvements ✅
(secondary)
-3.1% [-3.1%, -3.1%] 1
All ❌✅ (primary) -2.1% [-2.1%, -2.1%] 1

Cycles

Results (primary 0.8%, secondary 2.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)
0.8% [0.8%, 0.8%] 1
Regressions ❌
(secondary)
2.4% [2.1%, 3.0%] 7
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.8% [0.8%, 0.8%] 1

Binary size

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

Bootstrap: 780.385s -> 780.757s (0.05%)
Artifact size: 333.66 MiB -> 333.64 MiB (-0.01%)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-compiletest Area: The compiletest test runner A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-run-make Area: port run-make Makefiles to rmake.rs 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.