-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Rollup of 8 pull requests #136507
Conversation
- 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)
@bors r+ rollup=never p=5 |
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).
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: affdb59607 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (c705b7d): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis 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.
CyclesResults (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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 779.81s -> 778.542s (-0.16%) |
Successful merges:
ty::Value
where needed #136430 (Use the type-level constant valuety::Value
where needed)//@ ignore-{wasm,wasm32,emscripten}
in tests #136476 (Remove generic//@ ignore-{wasm,wasm32,emscripten}
in tests)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup