Skip to content

Conversation

@LorrensP-2158466
Copy link
Contributor

@LorrensP-2158466 LorrensP-2158466 commented Oct 27, 2025

Before #148329, using CmResolver in closures was not possible when trying to reborrow. This pr changes uses of &mut CmResolver into a bare CmResolver, to keep the code clean (and to not have &mut &mut Resolver)

r? @petrochenkov

@rustbot rustbot added 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. labels Oct 27, 2025
@LorrensP-2158466
Copy link
Contributor Author

cc @petrochenkov Because you reviewed and approved the first pr and because it's linked to our work in #145108

@LorrensP-2158466
Copy link
Contributor Author

@rustbot blocked

Blocked until #148289 is fixed;

@rustbot rustbot added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 31, 2025
@LorrensP-2158466 LorrensP-2158466 changed the title Hack RefOrMut to allow use in closures. Remove uses of &mut CmResolver Oct 31, 2025
@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot assigned petrochenkov and unassigned lcnr Oct 31, 2025
@bors

This comment was marked as resolved.

bors added a commit that referenced this pull request Dec 20, 2025
Better closure requirement propagation.

Fixes #148289
Fixes #104477
Should unblock #148187

When propagating closure requirements we:
- no longer try to find a post dominiting region for the list of non-local lower bounds of `longer_fr`.
- we filter the list of `longer_fr-: shorter_fr+` to only these constraints between external regions which are required regardless. If no such constraint exists, we fall back to propagating all of them.

See the [FCP](#148329 (comment)) for more information.

r? `@lcnr`
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Dec 21, 2025
Better closure requirement propagation.

Fixes rust-lang/rust#148289
Fixes rust-lang/rust#104477
Should unblock rust-lang/rust#148187

When propagating closure requirements we:
- no longer try to find a post dominiting region for the list of non-local lower bounds of `longer_fr`.
- we filter the list of `longer_fr-: shorter_fr+` to only these constraints between external regions which are required regardless. If no such constraint exists, we fall back to propagating all of them.

See the [FCP](rust-lang/rust#148329 (comment)) for more information.

r? `@lcnr`
Kobzol pushed a commit to Kobzol/rustc_codegen_gcc that referenced this pull request Dec 21, 2025
Better closure requirement propagation.

Fixes rust-lang/rust#148289
Fixes rust-lang/rust#104477
Should unblock rust-lang/rust#148187

When propagating closure requirements we:
- no longer try to find a post dominiting region for the list of non-local lower bounds of `longer_fr`.
- we filter the list of `longer_fr-: shorter_fr+` to only these constraints between external regions which are required regardless. If no such constraint exists, we fall back to propagating all of them.

See the [FCP](rust-lang/rust#148329 (comment)) for more information.

r? `@lcnr`
github-actions bot pushed a commit to rust-lang/rust-analyzer that referenced this pull request Dec 22, 2025
Better closure requirement propagation.

Fixes rust-lang/rust#148289
Fixes rust-lang/rust#104477
Should unblock rust-lang/rust#148187

When propagating closure requirements we:
- no longer try to find a post dominiting region for the list of non-local lower bounds of `longer_fr`.
- we filter the list of `longer_fr-: shorter_fr+` to only these constraints between external regions which are required regardless. If no such constraint exists, we fall back to propagating all of them.

See the [FCP](rust-lang/rust#148329 (comment)) for more information.

r? `@lcnr`
Kobzol pushed a commit to Kobzol/rustc_codegen_cranelift that referenced this pull request Dec 23, 2025
Better closure requirement propagation.

Fixes rust-lang/rust#148289
Fixes rust-lang/rust#104477
Should unblock rust-lang/rust#148187

When propagating closure requirements we:
- no longer try to find a post dominiting region for the list of non-local lower bounds of `longer_fr`.
- we filter the list of `longer_fr-: shorter_fr+` to only these constraints between external regions which are required regardless. If no such constraint exists, we fall back to propagating all of them.

See the [FCP](rust-lang/rust#148329 (comment)) for more information.

r? `@lcnr`
github-actions bot pushed a commit to rust-lang/compiler-builtins that referenced this pull request Dec 28, 2025
Better closure requirement propagation.

Fixes rust-lang/rust#148289
Fixes rust-lang/rust#104477
Should unblock rust-lang/rust#148187

When propagating closure requirements we:
- no longer try to find a post dominiting region for the list of non-local lower bounds of `longer_fr`.
- we filter the list of `longer_fr-: shorter_fr+` to only these constraints between external regions which are required regardless. If no such constraint exists, we fall back to propagating all of them.

See the [FCP](rust-lang/rust#148329 (comment)) for more information.

r? `@lcnr`
github-actions bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Dec 29, 2025
Better closure requirement propagation.

Fixes rust-lang/rust#148289
Fixes rust-lang/rust#104477
Should unblock rust-lang/rust#148187

When propagating closure requirements we:
- no longer try to find a post dominiting region for the list of non-local lower bounds of `longer_fr`.
- we filter the list of `longer_fr-: shorter_fr+` to only these constraints between external regions which are required regardless. If no such constraint exists, we fall back to propagating all of them.

See the [FCP](rust-lang/rust#148329 (comment)) for more information.

r? `@lcnr`
github-actions bot pushed a commit to rust-lang/stdarch that referenced this pull request Jan 1, 2026
Better closure requirement propagation.

Fixes rust-lang/rust#148289
Fixes rust-lang/rust#104477
Should unblock rust-lang/rust#148187

When propagating closure requirements we:
- no longer try to find a post dominiting region for the list of non-local lower bounds of `longer_fr`.
- we filter the list of `longer_fr-: shorter_fr+` to only these constraints between external regions which are required regardless. If no such constraint exists, we fall back to propagating all of them.

See the [FCP](rust-lang/rust#148329 (comment)) for more information.

r? `@lcnr`
@LorrensP-2158466
Copy link
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Jan 25, 2026
@LorrensP-2158466 LorrensP-2158466 marked this pull request as ready for review January 25, 2026 22:00
@petrochenkov
Copy link
Contributor

Very nice.
@bors r+ rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 26, 2026

📌 Commit 97b0578 has been approved by petrochenkov

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 Jan 26, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jan 26, 2026
…r=petrochenkov

Remove uses of `&mut CmResolver`

Before rust-lang#148329, using CmResolver in closures was not possible when trying to reborrow. This pr changes uses of `&mut CmResolver` into a bare `CmResolver`, to keep the code clean (and to not have `&mut &mut Resolver`)

r? @petrochenkov
rust-bors bot pushed a commit that referenced this pull request Jan 26, 2026
…uwer

Rollup of 4 pull requests

Successful merges:

 - #151137 (checksum-freshness: Fix invalid checksum calculation for binary files)
 - #148187 (Remove uses of `&mut CmResolver`)
 - #151626 (Remove `Deref<Target = TyCtxt>` from `QueryCtxt`)
 - #151661 (Suggest changing `iter`/`into_iter` when the other was meant)
rust-bors bot pushed a commit that referenced this pull request Jan 26, 2026
…uwer

Rollup of 7 pull requests

Successful merges:

 - #151290 (Recover from struct literals with placeholder or empty path)
 - #148187 (Remove uses of `&mut CmResolver`)
 - #151368 (Rustdoc performance improvements)
 - #151374 (some more rustc_borrowck cleanups)
 - #151536 (Fix sanitizer target builds on CI)
 - #151626 (Remove `Deref<Target = TyCtxt>` from `QueryCtxt`)
 - #151661 (Suggest changing `iter`/`into_iter` when the other was meant)
rust-bors bot pushed a commit that referenced this pull request Jan 26, 2026
…uwer

Rollup of 7 pull requests

Successful merges:

 - #151290 (Recover from struct literals with placeholder or empty path)
 - #148187 (Remove uses of `&mut CmResolver`)
 - #151368 (Rustdoc performance improvements)
 - #151374 (some more rustc_borrowck cleanups)
 - #151536 (Fix sanitizer target builds on CI)
 - #151626 (Remove `Deref<Target = TyCtxt>` from `QueryCtxt`)
 - #151661 (Suggest changing `iter`/`into_iter` when the other was meant)
@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Jan 26, 2026
Remove uses of `&mut CmResolver`



Before #148329, using CmResolver in closures was not possible when trying to reborrow. This pr changes uses of `&mut CmResolver` into a bare `CmResolver`, to keep the code clean (and to not have `&mut &mut Resolver`)

r? @petrochenkov
@rust-bors rust-bors bot 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 26, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 26, 2026

💔 Test for aeab821 failed: CI. Failed jobs:

@JonathanBrouwer
Copy link
Contributor

@bors retry
Spurious, see #151701

@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 Jan 26, 2026
rust-bors bot pushed a commit that referenced this pull request Jan 26, 2026
…uwer

Rollup of 7 pull requests

Successful merges:

 - #151290 (Recover from struct literals with placeholder or empty path)
 - #148187 (Remove uses of `&mut CmResolver`)
 - #151368 (Rustdoc performance improvements)
 - #151374 (some more rustc_borrowck cleanups)
 - #151536 (Fix sanitizer target builds on CI)
 - #151626 (Remove `Deref<Target = TyCtxt>` from `QueryCtxt`)
 - #151661 (Suggest changing `iter`/`into_iter` when the other was meant)
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
##[error]Could not find a part of the path 'D:\a'.

rust-bors bot pushed a commit that referenced this pull request Jan 26, 2026
…uwer

Rollup of 7 pull requests

Successful merges:

 - #151290 (Recover from struct literals with placeholder or empty path)
 - #148187 (Remove uses of `&mut CmResolver`)
 - #151368 (Rustdoc performance improvements)
 - #151374 (some more rustc_borrowck cleanups)
 - #151536 (Fix sanitizer target builds on CI)
 - #151626 (Remove `Deref<Target = TyCtxt>` from `QueryCtxt`)
 - #151661 (Suggest changing `iter`/`into_iter` when the other was meant)
@rust-bors rust-bors bot merged commit bd85bab into rust-lang:main Jan 27, 2026
11 of 12 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Jan 27, 2026
rust-timer added a commit that referenced this pull request Jan 27, 2026
Rollup merge of #148187 - LorrensP-2158466:cm-res-variance, r=petrochenkov

Remove uses of `&mut CmResolver`

Before #148329, using CmResolver in closures was not possible when trying to reborrow. This pr changes uses of `&mut CmResolver` into a bare `CmResolver`, to keep the code clean (and to not have `&mut &mut Resolver`)

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

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

7 participants