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 6 pull requests #135260

Merged
merged 20 commits into from
Jan 9, 2025
Merged

Rollup of 6 pull requests #135260

merged 20 commits into from
Jan 9, 2025

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

jieyouxu and others added 20 commits January 7, 2025 20:24
"Elements" are `RegionElement`s. The dense location mapping was removed
from the element containers a while ago but didn't rename its use-sites.
Most of the old naming only used the mapping, and are better named
`location_map`.
Its original naming hides the fact that it's related to datalog
polonius, and bound to be deleted in the near future.

It also conflicts with the expected name for the actual NLL location
map, and prefixing it with its use will make the differentiation
possible.
This is another strangely named struct (and associated fields) that is
hard to see was related to datalog polonius.
…rrors

Exhaustively handle expressions in patterns

We currently have this invariant in HIR that a `PatKind::Lit` or a `PatKind::Range` only contains

* `ExprKind::Lit`
* `ExprKind::UnOp(Neg, ExprKind::Lit)`
* `ExprKind::Path`
* `ExprKind::ConstBlock`

So I made `PatKind::Lit` and `PatKind::Range` stop containing `Expr`, and instead created a `PatLit` type whose `kind` enum only contains those variants.

The only place code got more complicated was in clippy, as it couldn't share as much anymore with `Expr` handling

It may be interesting on merging `ExprKind::{Path,Lit,ConstBlock}` in the future and using the same `PatLit` type (under a new name).

Then it should also be easier to eliminate any and all `UnOp(Neg, Lit) | Lit` matching that we have across the compiler. Some day we should fold the negation into the literal itself and just store it on the numeric literals
…-ozkan

triagebot: mark tidy changes with a more specific `A-tidy` label

r? `@onur-ozkan`
…errors

Ensure that we don't try to access fields on a non-struct pattern type

Fix rust-lang#135209.
A couple simple borrowck cleanups

This PR has a couple simple renamings:
- it's been a long time since the mapping from `Location`s to `PointIndex`es was extracted from `RegionElements` into the `DenseLocationMap`, but only the types were renamed at the time. borrowck still refers to this map as `elements`. That's confusing, especially since sometimes we also use the mapping via `LivenessValues`, and makes more sense as `location_map` instead.
- to clarify `LocationTable` is not as general as it sounds, and is only for datalog polonius. In this branch I didn't rename the handful of `location_table` fields and params to `polonius_table`, but can do that to differentiate it even more from `location_map`. I did try it locally and it looks worthwhile, so if you'd prefer I can also push it here. (Or we could even switch these datalog types and fields to even more explicit names)
- to clarify the incomprehensible `AllFacts`, it is renamed to `PoloniusFacts`. These can be referred to as `facts` within the legacy polonius module, but as `polonius_facts` outside of it to make it clear that they're not about NLLs (nor are they about in-tree polonius but that'll be magically fixed when they're removed in the future)

r? `@matthewjasper`
…ark-Simulacrum

Revert rust-lang#131365

This PR reverts rust-lang#131365, following the revert we did on the beta branches for both 1.84 and 1.85.

While the PR passes CI successfully on master, as soon as we branch off beta it starts failing in the newly created beta branch. This caused the release team to revert it for both 1.84 and 1.85, and if nothing is done it would continue being reverted every cycle.

`@heiseish` (PR author) feel free to submit the PR again in the future: this revert doesn't represent the release team rejecting your change, but just a (hopefully temporary!) revert to ensure future beta branches can be created without reverting it each time.

When submitting the PR again, I recommend you test your changes by configuring `rust.channel` to both `nightly` and `beta` in your `config.toml`. You can see the latest failure [here](rust-lang#135163 (comment)).
@rustbot rustbot added A-meta Area: Issues & PRs about the rust-lang/rust repository itself 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-release Relevant to the release subteam, 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 Jan 8, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=6

@bors
Copy link
Contributor

bors commented Jan 8, 2025

📌 Commit 6a093f7 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 8, 2025
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jan 8, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 8, 2025
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#134228 (Exhaustively handle expressions in patterns)
 - rust-lang#135194 (triagebot: mark tidy changes with a more specific `A-tidy` label)
 - rust-lang#135222 (Ensure that we don't try to access fields on a non-struct pattern type)
 - rust-lang#135250 (A couple simple borrowck cleanups)
 - rust-lang#135252 (Fix release notes link)
 - rust-lang#135253 (Revert rust-lang#131365)

Failed merges:

 - rust-lang#135195 (Make `lit_to_mir_constant` and `lit_to_const` infallible)

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

bors commented Jan 8, 2025

⌛ Testing commit 6a093f7 with merge 18bfeb2...

@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
   Compiling rustc_driver v0.0.0 (C:\a\rust\rust\compiler\rustc_driver)
[RUSTC-TIMING] rustc_driver test:false 4.793
error: linking with `link.exe` failed: exit code: 1104
  |
  = note: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.42.34433\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\symbols.o" "<1 object files omitted>" "C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-rustc\\x86_64-pc-windows-msvc\\release\\deps\\rustc_driver-b294651aece59296.dll.lib" "C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib/{libcompiler_builtins-5fe297e6720ad64e.rlib}" "psapi.lib" "shell32.lib" "ole32.lib" "uuid.lib" "advapi32.lib" "ws2_32.lib" "ntdll.lib" "kernel32.lib" "advapi32.lib" "ole32.lib" "oleaut32.lib" "advapi32.lib" "cfgmgr32.lib" "gdi32.lib" "kernel32.lib" "msimg32.lib" "opengl32.lib" "user32.lib" "winspool.lib" "legacy_stdio_definitions.lib" "bcrypt.lib" "advapi32.lib" "kernel32.lib" "kernel32.lib" "advapi32.lib" "ntdll.lib" "userenv.lib" "ws2_32.lib" "dbghelp.lib" "/defaultlib:libcmt" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\advapi32.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\api-ms-win-core-errorhandling-l1-1-3.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\api-ms-win-core-file-fromapp-l1-1-0.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\api-ms-win-core-handle-l1-1-0.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\api-ms-win-core-ioring-l1-1-0.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\api-ms-win-core-memory-l1-1-3.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\api-ms-win-core-memory-l1-1-4.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\api-ms-win-core-memory-l1-1-5.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\api-ms-win-core-memory-l1-1-6.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\api-ms-win-core-memory-l1-1-7.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\api-ms-win-core-memory-l1-1-8.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\api-ms-win-core-synch-l1-2-0.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\api-ms-win-core-sysinfo-l1-2-0.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\api-ms-win-core-sysinfo-l1-2-3.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\api-ms-win-core-sysinfo-l1-2-4.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\api-ms-win-core-sysinfo-l1-2-6.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\api-ms-win-core-util-l1-1-1.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\api-ms-win-core-winrt-error-l1-1-0.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\api-ms-win-core-winrt-l1-1-0.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\api-ms-win-core-wow64-l1-1-1.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\api-ms-win-security-base-l1-2-2.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\avrt.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\bcp47mrm.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\bcryptprimitives.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\clfsw32.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\dbghelp.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\elscore.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\gdi32.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\icu.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\imagehlp.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\kernel32.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\ktmw32.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\netapi32.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\normaliz.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\ntdll.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\ntdllk.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\ole32.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\oleacc.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\oleaut32.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\propsys.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\psapi.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\rtworkq.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\txfw32.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\user32.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\usp10.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\version.dll_imports_indirect.lib" "C:\\a\\_temp\\msys64\\tmp\\rustc2cVAzi\\wofutil.dll_imports_indirect.lib" "/NXCOMPAT" "/LIBPATH:C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.42.34433\\atlmfc\\lib\\x64" "/LIBPATH:C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-rustc\\x86_64-pc-windows-msvc\\release\\build\\stacker-65940be31991f934\\out" "/LIBPATH:C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.42.34433\\atlmfc\\lib\\x64" "/LIBPATH:C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-rustc\\x86_64-pc-windows-msvc\\release\\build\\psm-d610b57513123f9f\\out" "/LIBPATH:C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.42.34433\\atlmfc\\lib\\x64" "/LIBPATH:C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-rustc\\x86_64-pc-windows-msvc\\release\\build\\blake3-d080ce1a764373c6\\out" "/LIBPATH:C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.42.34433\\atlmfc\\lib\\x64" "/LIBPATH:C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-rustc\\x86_64-pc-windows-msvc\\release\\build\\blake3-d080ce1a764373c6\\out" "/LIBPATH:C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.42.34433\\atlmfc\\lib\\x64" "/LIBPATH:C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-rustc\\x86_64-pc-windows-msvc\\release\\build\\rustc_llvm-ed11f260c0083fcb\\out" "/LIBPATH:C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\llvm\\lib" "/OUT:C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-rustc\\x86_64-pc-windows-msvc\\release\\deps\\rustc_main-1f4c01b61688b5c0.exe" "/OPT:REF,ICF" "/DEBUG" "/PDBALTPATH:%_PDB%" "/MANIFEST:EMBED" "/MANIFESTINPUT:C:\\a\\rust\\rust\\compiler\\rustc\\Windows Manifest.xml" "/WX"
  = note: LINK : fatal error LNK1104: cannot open file 'C:\a\rust\rust\build\x86_64-pc-windows-msvc\stage1-rustc\x86_64-pc-windows-msvc\release\deps\rustc_main-1f4c01b61688b5c0.exe'␍
          

[RUSTC-TIMING] rustc_main test:false 0.656

@bors
Copy link
Contributor

bors commented Jan 8, 2025

💔 Test failed - checks-actions

@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 Jan 8, 2025
@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 Jan 8, 2025
@matthiaskrgr matthiaskrgr added the CI-spurious-fail-msvc CI spurious failure: target env msvc label Jan 8, 2025
@bors
Copy link
Contributor

bors commented Jan 8, 2025

⌛ Testing commit 6a093f7 with merge e26ff2f...

@bors
Copy link
Contributor

bors commented Jan 9, 2025

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

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

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#134228 Exhaustively handle expressions in patterns b92ccaf8f58fdb0ec4cda86c17b7cc2e79eefbdd (link)
#135194 triagebot: mark tidy changes with a more specific A-tidy aff4cd57be67b00dc5329904505fa095e421cca1 (link)
#135222 Ensure that we don't try to access fields on a non-struct p… 3ab96d4dae48588cc17549ac495108dfabe6164a (link)
#135250 A couple simple borrowck cleanups 5138c32609ccd4c75d3cd6bf47aa61ac1c45c475 (link)
#135252 Fix release notes link 3a1033c305dc410fa112e3770aeaa1369865ab66 (link)
#135253 Revert #131365 98b185fed6a5e0800f5b9f3b9bcae92ef5ab39f9 (link)

previous master: a580b5c379

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Area: Issues & PRs about the rust-lang/rust repository itself CI-spurious-fail-msvc CI spurious failure: target env msvc 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-release Relevant to the release subteam, 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.

10 participants