Skip to content

Conversation

jackh726
Copy link
Member

@jackh726 jackh726 commented Oct 1, 2025

Fixes rust-lang/trait-system-refactor-initiative#240

Also did a little bit of cleanup, can squash the commits if decided.

r? lcnr

@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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Oct 1, 2025
@rust-cloud-vms rust-cloud-vms bot force-pushed the opaque-type-fallback branch from ca75834 to a3fbae5 Compare October 2, 2025 21:20
@rustbot
Copy link
Collaborator

rustbot commented Oct 2, 2025

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@jackh726
Copy link
Member Author

jackh726 commented Oct 3, 2025

@lcnr I fixed your first three comments. The rename from first_pass to error_on_missing_defining_use kind of just made me realize that assert!(prev.is_none) is just kind of not needed, so I added a comment explaining as such. Your last comment, I do have strongish feelings about, replied on that. Curious on your thoughts.

@rust-log-analyzer

This comment has been minimized.

…ve the assert in favor over a comment, and change to & for &mut
@jackh726 jackh726 force-pushed the opaque-type-fallback branch from c113b29 to 283ad66 Compare October 3, 2025 22:01
Comment on lines +115 to +117
// We do actually need to check this the second pass (we can't just
// store this), because we can go from `UnconstrainedHiddenType` to
// `HasDefiningUse` (because of fallback)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can also just go from no uses to a defining use due to fallback, e.g. if you have soem ?will_fallback: Trait<opaque> goal

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is UnconstrainedHiddleType?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it could also be None. Maybe not with this specific example, but certainly with ?will_fallback: RequiresSend<fn_ptr_to_opaque>

Copy link
Contributor

@lcnr lcnr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please also/instead add the more minimized tests from rust-lang/trait-system-refactor-initiative#240

View changes since this review

@jackh726
Copy link
Member Author

please also/instead add the more minimized tests from rust-lang/trait-system-refactor-initiative#240

Done. Just put each minimization in the same test file.

Copy link
Contributor

@lcnr lcnr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rust-cloud-vms rust-cloud-vms bot force-pushed the opaque-type-fallback branch from 2fc6f80 to d51f09e Compare October 13, 2025 20:25
@jackh726
Copy link
Member Author

@bors r=lcnr

@bors
Copy link
Collaborator

bors commented Oct 14, 2025

📌 Commit d51f09e has been approved by lcnr

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 Oct 14, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Oct 14, 2025
Do two passes of `handle_opaque_type_uses_next`

Fixes rust-lang/trait-system-refactor-initiative#240

Also did a little bit of cleanup, can squash the commits if decided.

r? lcnr
Zalathar added a commit to Zalathar/rust that referenced this pull request Oct 14, 2025
Do two passes of `handle_opaque_type_uses_next`

Fixes rust-lang/trait-system-refactor-initiative#240

Also did a little bit of cleanup, can squash the commits if decided.

r? lcnr
bors added a commit that referenced this pull request Oct 14, 2025
Rollup of 11 pull requests

Successful merges:

 - #146277 (Enable `u64` limbs in `core::num::bignum`)
 - #146976 (constify basic Clone impls)
 - #147249 (Do two passes of `handle_opaque_type_uses_next`)
 - #147266 (fix 2 search graph bugs)
 - #147468 (Implement fs api set_times and set_times_nofollow)
 - #147497 (`proc_macro` cleanups (3/N))
 - #147594 (std: implement `pal::os::exit` for VEXos)
 - #147596 (Adjust the Arm targets in CI to reflect latest changes)
 - #147607 (GVN: Invalidate derefs at loop headers)
 - #147620 (Avoid redundant UB check in RangeFrom slice indexing)
 - #147647 (Hide vendoring and copyright in GHA group)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 14, 2025
Do two passes of `handle_opaque_type_uses_next`

Fixes rust-lang/trait-system-refactor-initiative#240

Also did a little bit of cleanup, can squash the commits if decided.

r? lcnr
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 14, 2025
Do two passes of `handle_opaque_type_uses_next`

Fixes rust-lang/trait-system-refactor-initiative#240

Also did a little bit of cleanup, can squash the commits if decided.

r? lcnr
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 14, 2025
Do two passes of `handle_opaque_type_uses_next`

Fixes rust-lang/trait-system-refactor-initiative#240

Also did a little bit of cleanup, can squash the commits if decided.

r? lcnr
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 14, 2025
Do two passes of `handle_opaque_type_uses_next`

Fixes rust-lang/trait-system-refactor-initiative#240

Also did a little bit of cleanup, can squash the commits if decided.

r? lcnr
bors added a commit that referenced this pull request Oct 14, 2025
Rollup of 12 pull requests

Successful merges:

 - #146277 (Enable `u64` limbs in `core::num::bignum`)
 - #146976 (constify basic Clone impls)
 - #147249 (Do two passes of `handle_opaque_type_uses_next`)
 - #147266 (fix 2 search graph bugs)
 - #147497 (`proc_macro` cleanups (3/N))
 - #147546 (Suppress unused_parens for labeled break)
 - #147548 (Fix ICE for never pattern as closure parameters)
 - #147594 (std: implement `pal::os::exit` for VEXos)
 - #147596 (Adjust the Arm targets in CI to reflect latest changes)
 - #147607 (GVN: Invalidate derefs at loop headers)
 - #147620 (Avoid redundant UB check in RangeFrom slice indexing)
 - #147647 (Hide vendoring and copyright in GHA group)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 3a80521 into rust-lang:master Oct 14, 2025
10 checks passed
@rustbot rustbot added this to the 1.92.0 milestone Oct 14, 2025
rust-timer added a commit that referenced this pull request Oct 14, 2025
Rollup merge of #147249 - jackh726:opaque-type-fallback, r=lcnr

Do two passes of `handle_opaque_type_uses_next`

Fixes rust-lang/trait-system-refactor-initiative#240

Also did a little bit of cleanup, can squash the commits if decided.

r? lcnr
@jackh726 jackh726 deleted the opaque-type-fallback branch October 14, 2025 17:30
@Zalathar
Copy link
Contributor

Bors hasn't noticed that this was merged.

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

handle_opaque_type_uses happens after fallback

6 participants