Skip to content

Rollup of 4 pull requests - #160419

Closed
JonathanBrouwer wants to merge 11 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-VEBEIiU
Closed

Rollup of 4 pull requests#160419
JonathanBrouwer wants to merge 11 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-VEBEIiU

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

im-lunex and others added 11 commits August 1, 2026 19:12
* fix borrowck ICE for consts with fn pointer type

annotate_argument_and_return_for_borrow called tcx.fn_sig on the item being
checked whenever its type was FnDef or FnPtr. for a const whose type is a fn
pointer that's not a function item, so we ICE'd with "unexpected sort of node
in fn_sig". take the signature from the fn ptr type instead and skip the
annotation when there's no fn decl.
* run rustfmt and refmt
* fix borrowck ICE for consts with fn pointer type

annotate_argument_and_return_for_borrow called tcx.fn_sig on the item being
checked whenever its type was FnDef or FnPtr. for a const whose type is a fn
pointer that's not a function item, so we ICE'd with "unexpected sort of node
in fn_sig". take the signature from the fn ptr type instead and skip the
annotation when there's no fn decl.
* edit comment
* use ty.fn_sig per review
This commit changes `DEP_KIND_NUM_VARIANTS` so it's an associated const
(renamed as `DepKind::NUM_VARIANTS`) obtained via
`std::mem::variant_count`, removing the paranoid consecutiveness check.
The commit also replaces multiple `DepKind::MAX as usize + 1`
occurrences with `DepKind::NUM_VARIANTS`.
It contains pre-stringified versions of all the `DepKind` variants. But
we can just stringify on demand using `format!("{:?}")`.
Co-authored-by: Jakub Beránek <berykubik@gmail.com>
…lathar

`DepKind` cleanups

Details in individual commits.

r? Zalathar
…efault-parent, r=nnethercote

Fix ICE for direct inline const generic defaults

Fixes rust-lang#159063

This pr is for using the defaulted const parameter's parent to find the generics containing the parameter, instead of using the queried anonymous const's parent.
fix borrowck ICE for consts with fn pointer type

`borrowck`'s `annotate_argument_and_return_for_borrow` called `tcx.fn_sig` on the item being checked whenever its type was a `fn def` or `fn ptr`. For a const like `const A: fn()`, that asks for the signature of the const itself, which is not a function item, so we ICE'd with `"unexpected sort of node in fn_sig"`.

Now we take the signature from the `fn ptr` type instead and skip the annotation when there's no `fn decl` to annotate.

also added a regression test under `tests/ui/borrowck`.

fixes: rust-lang#160255
…, r=Kobzol

Add PR body notes for Cargo lock file maintenance

r? @Kobzol
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Aug 3, 2026
@rustbot rustbot added 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. labels Aug 3, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Contributor Author

@bors r+ rollup=never p=5

Trying commonly failed jobs
@bors try jobs=dist-various-1,test-various,x86_64-gnu-aux,x86_64-gnu-llvm-21-3,x86_64-msvc-1,aarch64-apple,x86_64-mingw-1,i686-msvc-*

@rust-bors

rust-bors Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

📌 Commit f15b2ab has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Aug 3, 2026
@rust-bors

rust-bors Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

⌛ Trying commit f15b2ab with merge dcaa7d8

To cancel the try build, run the command @bors try cancel.

Workflow: https://github.com/rust-lang/rust/actions/runs/30796488271

rust-bors Bot pushed a commit that referenced this pull request Aug 3, 2026
Rollup of 4 pull requests


try-job: dist-various-1
try-job: test-various
try-job: x86_64-gnu-aux
try-job: x86_64-gnu-llvm-21-3
try-job: x86_64-msvc-1
try-job: aarch64-apple
try-job: x86_64-mingw-1
try-job: i686-msvc-*
@JonathanBrouwer

Copy link
Copy Markdown
Contributor Author

@bors try cancel

@rust-bors rust-bors Bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Aug 3, 2026
@rust-bors

rust-bors Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved due to being closed.

@rust-bors rust-bors Bot removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Aug 3, 2026
@rust-bors

rust-bors Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Try build cancelled. Cancelled workflows:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants