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 9 pull requests #136505

Closed
wants to merge 27 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

lqd and others added 27 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>
…ays, r=oli-obk

Always compute coroutine layout for eagerly emitting recursive layout errors

Detect recursive coroutine layouts even if we don't detect opaque type recursion in the new solver. This is for two reasons:
1. It helps us detect (bad) recursive async function calls in the new solver, which due to its approach to normalization causes us to not detect this via a recursive RPIT (since the opaques are more eagerly revealed in the opaque body).
    * Fixes rust-lang/trait-system-refactor-initiative#137.
2. It helps us detect (bad) recursive async functions behind AFITs. See the AFIT test that changed for the old solver too.
3. It also greatly simplifies the recursive impl trait check, since I can remove some jankness around how it handles coroutines.
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. labels Feb 3, 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. 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 81aa190 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
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-tools failed! Check out the build log: (web) (plain)

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

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 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.