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 8 pull requests #136507

Merged
merged 25 commits into from
Feb 4, 2025
Merged

Rollup of 8 pull requests #136507

merged 25 commits into from
Feb 4, 2025

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

lqd and others added 25 commits January 31, 2025 10:57
- describe how that data flows during borrowck
- prepares for recording some liveness data for diagnostics, not just
  for the main analysis
this is used in diagnostics to focus on relevant live locals to match
NLL diagnostics
also add explicit revisions for -Zpolonius=next
The blessed expectations were recently removed because they were only
checked via the compare-mode. This switches to explicit revisions to
ensure it doesn't happen again.

- `assignment-to-differing-field`
- `polonius-smoke-test`
- `subset-relations`
- it still mentions AST borrowck
- it tracks errors that shouldn't exist and are fixed by polonius
When the word "cache" appears in the context of the query system, it often
isn't obvious whether that is referring to the in-memory query cache or the
on-disk incremental cache.

For these types, we can assure the reader that they are for in-memory caching.
Signed-off-by: FedericoBruzzone <federico.bruzzone.i@gmail.com>
Signed-off-by: FedericoBruzzone <federico.bruzzone.i@gmail.com>
OnceCell & OnceLock docs: Using (un)initialized consistently

Changed
* `set` / `initialize` / `full` to `initialized state`
* `uninitialize` / `empty` to `uninitialized state`
* `f` to `f()`
* Added explaination of `uninitialized state` & `initialized state`

[OnceCell Docs](https://doc.rust-lang.org/nightly/std/cell/struct.OnceCell.html)
[OnceLock Docs](https://doc.rust-lang.org/nightly/std/sync/struct.OnceLock.html)

Fixes rust-lang#85716
``@rustbot`` label +A-docs
…kh726

Ignore NLL boring locals in polonius diagnostics

Another easy one ``@jackh726`` (the diff is inflated by blessed test expectations don't worry :)

NLLs don't compute liveness for boring locals, and therefore cannot find them in causes explaining borrows. In polonius, we don't have this liveness optimization (we may be able to do something partially similar in the future, e.g. for function parameters and the like), so we do encounter these in diagnostics even though we don't want to. This PR:
- restructures the polonius context into per-phase data, in spirit as you requested in an earlier review
- stores the locals NLLs would consider boring into the errors/diagnostics data
- ignores these if a boring local is found when trying to explain borrows

This PR fixes around 80 cases of diagnostics differences between `-Zpolonius=next` and NLLs. I've also added explicit revisions to a few polonius tests (both for the in-tree implementation as well as the datalog implementation -- even if we'll eventually remove them). I didn't do this for all the "dead" expectations that were removed from rust-lang#136112 for that same reason, it's fine. I'll soon/eventually add explicit revisions where they're needed: there's only a handful of tests left to fix.

r? ``@jackh726``
Omit argument names from function pointers that do not have argument names

This matches the style used for the vast majority of function pointer types in real-world code, in my experience. Prefixing `_: ` to every argument does not improve clarity.

**Before:**

<img src="https://github.com/user-attachments/assets/f07efa8b-d57e-4897-aa97-40db7d207862">

**After:**

<img src="https://github.com/user-attachments/assets/8405e08b-d6d2-4904-bcc3-a3eb866cecf0">
… r=oli-obk

Use the type-level constant value `ty::Value` where needed

**Follow-up to rust-lang#136180**

### Summary

This PR refactors functions to accept a single type-level constant value `ty::Value` instead of separate `ty::ValTree` and `ty::Ty` parameters:

- `valtree_to_const_value`: now takes `ty::Value`
- `pretty_print_const_valtree`: now takes `ty::Value`
- Uses `pretty_print_const_valtree` for formatting valtrees  when `visit_const_operand`
- Moves `try_to_raw_bytes` from `ty::Valtree` to `ty::Value`

---

r? ``@lukas-code`` ``@oli-obk``
Remove generic `//@ ignore-{wasm,wasm32,emscripten}` in tests

Follow-up to rust-lang#135926.

In favor of capability-based guards `//@ needs-{unwind,subprocess}`.

Resolves rust-lang#135923.

r? ``@ghost``

try-job: test-various
…ouxu

Notes on types/traits used for in-memory query caching

When the word "cache" appears in the context of the query system, it often isn't obvious whether that is referring to the in-memory query cache or the on-disk incremental cache.

For these types, we can assure the reader that they are for in-memory caching.
…oratrieb

platform-support: document CPU baseline for x86-32 targets

Also fixes the footnote for i686-unknown-hurd-gnu (which has the bad case of the x87 issue since it uses a non-SSE baseline) and adds the missing footnote for i686-unknown-redox. Both of those targets break our usual pattern by not using the Pentium 4 baseline, but fixing that is a much larger change that I will not pursue (see [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/x86-32.20target.20names)).

Cc ``@bjorn3``
Update books

## rust-lang/book

2 commits in fa312a343fbff01bc6cef393e326817f70719813..e2fa4316c5a7c0d2499c5d6b799adcfad6ef7a45
2025-02-03 15:02:07 UTC to 2025-02-01 17:33:39 UTC

- Add missing word in ch17-04-streams.md (rust-lang/book#4218)
- Fix typo in ch5.3 and in CONTRIBUTING.md (rust-lang/book#4216)

## rust-lang/edition-guide

2 commits in 4ed5a1a4a2a7ecc2e529a5baaef04f7bc7917eda..f56aecc3b036dff16404b525a83b00f911b9bbea
2025-02-03 17:14:16 UTC to 2025-01-31 17:44:00 UTC

- Rustc{En,De}codable has been removed (rust-lang/edition-guide#353)
- Remove rustfmt-overflow-delimited-expr (rust-lang/edition-guide#357)

## rust-lang/nomicon

3 commits in bc2298865544695c63454fc1f9f98a3dc22e9948..336f75835a6c0514852cc65aba9a698b699b13c8
2025-02-02 10:06:30 UTC to 2025-02-02 08:35:20 UTC

- Improve grammar in exotic-sizes (rust-lang/nomicon#452)
- other-reprs: Add details for n!=1 repr(packed) (rust-lang/nomicon#460)
- Use `()` instead of `[u8; 0]` in opaque type (rust-lang/nomicon#456)

## rust-lang/reference

3 commits in 93b921c7d3213d38d920f7f905a3bec093d2217d..4249fb411dd27f945e2881eb0378044b94cee06f
2025-01-31 03:43:07 UTC to 2025-01-29 04:17:34 UTC

- Add Spec Identifier Syntax to expressions.md and subchapters (rust-lang/reference#1591)
- Exclude the test summary from the search index (rust-lang/reference#1723)
- Spec inline assembly tests (rust-lang/reference#1648)

## rust-lang/rust-by-example

1 commits in 054259ed1bf01cdee4309ee764c7e103f6df3de5..743766929f1e53e72fab74394ae259bbfb4a7619
2025-02-02 19:53:31 UTC to 2025-02-02 19:53:31 UTC

- Spanish translation to 1:2100 (rust-lang/rust-by-example#1910)
@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-tidy Area: The tidy tool 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 Feb 3, 2025
@rustbot rustbot added 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. rollup A PR which is a rollup labels Feb 3, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Feb 3, 2025

📌 Commit 1869633 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 Feb 3, 2025
@bors
Copy link
Contributor

bors commented Feb 4, 2025

⌛ Testing commit 1869633 with merge c705b7d...

@rust-highfive
Copy link
Collaborator

📣 Toolstate changed by #136507!

Tested on commit c705b7d.
Direct link to PR: #136507

🎉 edition-guide on windows: test-fail → test-pass (cc @ehuss).
🎉 edition-guide on linux: test-fail → test-pass (cc @ehuss).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Feb 4, 2025
Tested on commit rust-lang/rust@c705b7d.
Direct link to PR: <rust-lang/rust#136507>

🎉 edition-guide on windows: test-fail → test-pass (cc @ehuss).
🎉 edition-guide on linux: test-fail → test-pass (cc @ehuss).
@bors
Copy link
Contributor

bors commented Feb 4, 2025

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 4, 2025
@bors bors merged commit c705b7d into rust-lang:master Feb 4, 2025
7 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Feb 4, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#136289 OnceCell & OnceLock docs: Using (un)initialized consistently 19af5013fbcc66884edf364dea19b476881cfe15 (link)
#136299 Ignore NLL boring locals in polonius diagnostics e5a6aa15823a57628621af9c983a93a3f3cfeb71 (link)
#136411 Omit argument names from function pointers that do not have… 1fd4b37089c800a7f8af8b0aaeb925d4b4684413 (link)
#136430 Use the type-level constant value ty::Value where needed c5bb19852565ca48e7ea876165f65010652d25a0 (link)
#136476 Remove generic //@ ignore-{wasm,wasm32,emscripten} in tes… 5407c44a93e40385f52eb765e21426a1abf0b664 (link)
#136484 Notes on types/traits used for in-memory query caching fb55437f5735eacfe994a6c8d3ad36f187d56e6f (link)
#136493 platform-support: document CPU baseline for x86-32 targets a38c878519c9fd8d619a077f6a7d3aa843f65604 (link)
#136498 Update books fb4252f6e1cdb7ee22da917ecb872be830204cb1 (link)

previous master: affdb59607

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 (c705b7d): 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 (primary 5.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)
5.4% [5.4%, 5.4%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 5.4% [5.4%, 5.4%] 1

Cycles

Results (secondary 10.7%)

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)
10.7% [10.1%, 11.6%] 6
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 779.81s -> 778.542s (-0.16%)
Artifact size: 328.85 MiB -> 328.79 MiB (-0.02%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-tidy Area: The tidy tool 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.