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 7 pull requests #121904

Merged
merged 17 commits into from Mar 2, 2024
Merged

Rollup of 7 pull requests #121904

merged 17 commits into from Mar 2, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

ChrisDenton and others added 17 commits February 27, 2024 11:28
After desugaring, `let` expressions should only appear inside `if` expressions
or `match` guards, possibly nested within a let-chain. In both cases they are
specifically handled by the lowerings of those expressions, so this case is
currently unreachable.
Use the OS thread name by default if `THREAD_INFO` has not been initialized

Currently if `THREAD_INFO` hasn't been initialized then the name will be set to `None`.  This PR changes it to use the OS thread name by default. This mostly affects foreign threads at the moment but we could expand this to make more use of the OS thread name in the future.

Note: I've only implemented `Thread::get_name` for windows, linux and macos (and macos adjacent) targets. The rest just return `None`.
…risDenton

Move thread local implementation to `sys`

Part of rust-lang#117276.
attempt to further clarify addr_of docs
…notriddle

Correctly generate item info of trait items

Fixes rust-lang#121772.

The `document_info` function was wrongly used when documenting a trait item.

r? `@notriddle`
style library/core/src/error.rs

Add an extra blank line for clarity in distinguishing implementations.
The ordinary lowering of `thir::ExprKind::Let` is unreachable

After desugaring, `let` expressions should only appear inside `if` expressions or `match` guards, possibly nested within a let-chain. In both cases they are specifically handled by the lowerings of those expressions, so this case is currently unreachable.

---

Context: https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Lowering.20of.20.60thir.3A.3AExprKind.3A.3ALet.60.20is.20unreachable

My conclusions are partly based on the observation that stubbing out this match arm doesn't cause any test failures. So either this really is unreachable, or it can be reached in some obscure circumstances that our test suite doesn't cover.

If we end up needing this code (or something like it) for an implementation of rust-lang/rfcs#3573, it should be easy enough to pull it back out of version control history.

I looked into having the `if`/`match` lowerings call back into `expr_into_dest`, but from what I can tell that won't work well, because there are extra scoping considerations that require some awareness of the enclosing if/match.

r? ```@Nadrieril```
avoid collecting into vecs in some places
@rustbot rustbot added O-hermit Operating System: Hermit O-itron Operating System: ITRON O-SGX Target: SGX O-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative rollup A PR which is a rollup labels Mar 2, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=7

@bors
Copy link
Contributor

bors commented Mar 2, 2024

📌 Commit fcf5805 has been approved by matthiaskrgr

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 2, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 2, 2024
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#121666 (Use the OS thread name by default if `THREAD_INFO` has not been initialized)
 - rust-lang#121758 (Move thread local implementation to `sys`)
 - rust-lang#121759 (attempt to further clarify addr_of docs)
 - rust-lang#121855 (Correctly generate item info of trait items)
 - rust-lang#121888 (style library/core/src/error.rs)
 - rust-lang#121892 (The ordinary lowering of `thir::ExprKind::Let` is unreachable)
 - rust-lang#121895 (avoid collecting into vecs in some places)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors
Copy link
Contributor

bors commented Mar 2, 2024

⌛ Testing commit fcf5805 with merge d25ab9c...

@ChrisDenton
Copy link
Contributor

auto - x86_64-gnu-stable seems to have hung?

@matthiaskrgr
Copy link
Member Author

yeah, waiting to see if its just the output that is stuck or the entire job

@bors
Copy link
Contributor

bors commented Mar 2, 2024

💥 Test timed out

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

@bors retry

@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 2, 2024
@bors
Copy link
Contributor

bors commented Mar 2, 2024

⌛ Testing commit fcf5805 with merge 5119208...

@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@bors
Copy link
Contributor

bors commented Mar 2, 2024

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 2, 2024
@bors bors merged commit 5119208 into rust-lang:master Mar 2, 2024
12 checks passed
@rustbot rustbot added this to the 1.78.0 milestone Mar 2, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#121666 Use the OS thread name by default if THREAD_INFO has not … 1dff4bce653fc41e40f41389585343c4d65c4b9e (link)
#121758 Move thread local implementation to sys ea55f8c34ab5848dd2a26783e0179357c9e40ba7 (link)
#121759 attempt to further clarify addr_of docs 898710e425f0046a25632b0f0ed41d269b0ef758 (link)
#121855 Correctly generate item info of trait items 9d1c7765f4df9a92037bec293c283abd736e76b4 (link)
#121888 style library/core/src/error.rs 979ec7439700d3daa9d95cd3cadafd0d4379c688 (link)
#121892 The ordinary lowering of thir::ExprKind::Let is unreachab… bbc332158a309ee2a3af0b0a0d1841659c2c5fc4 (link)
#121895 avoid collecting into vecs in some places 070125bfeb2cf741dee538ead8ac4c912552f892 (link)

previous master: 5257aee7dd

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

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

Max RSS (memory usage)

Results

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)
3.9% [3.1%, 4.7%] 2
Improvements ✅
(primary)
-2.1% [-2.2%, -2.0%] 2
Improvements ✅
(secondary)
-3.8% [-5.0%, -2.6%] 3
All ❌✅ (primary) -2.1% [-2.2%, -2.0%] 2

Cycles

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

Binary size

Results

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.0% [0.0%, 0.0%] 4
Regressions ❌
(secondary)
0.0% [0.0%, 0.0%] 34
Improvements ✅
(primary)
-0.0% [-0.0%, -0.0%] 10
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.0% [-0.0%, 0.0%] 14

Bootstrap: 652.672s -> 652.82s (0.02%)
Artifact size: 175.51 MiB -> 175.51 MiB (-0.00%)

@matthiaskrgr matthiaskrgr deleted the rollup-qcq0d3h branch March 16, 2024 18:19
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. O-hermit Operating System: Hermit O-itron Operating System: ITRON O-SGX Target: SGX O-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface O-windows Operating system: Windows 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-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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet