Skip to content

split definition and use site hidden tys - #148170

Merged
bors merged 2 commits into
rust-lang:masterfrom
lcnr:opaques-early-binder
Nov 2, 2025
Merged

split definition and use site hidden tys#148170
bors merged 2 commits into
rust-lang:masterfrom
lcnr:opaques-early-binder

Conversation

@lcnr

@lcnrlcnr commented Oct 27, 2025

Copy link
Copy Markdown
Contributor

Tracking this implicitly is kinda messy and easy to get wrong.

r? @BoxyUwU

@rustbot

Copy link
Copy Markdown
Collaborator

Some changes occurred in exhaustiveness checking

cc @Nadrieril

@rustbotrustbot 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 Oct 27, 2025
Comment on lines -553 to -555
for hidden_ty in fcx_typeck_results.hidden_types.values() {
assert!(!hidden_ty.has_infer());
}

@lcnrlcnrOct 27, 2025

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

ideally this is just an assert in EarlyBinder::bind. Adding that is more annoying than I expected as we need to do some lifetime dependent shit in some of the query system stuff which relies on transmutes. nm, actually just gonna do that in this PR as well

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

also ass because we create ty::EarlyBinder<'tcx, impl IntoIterator<Item = ty::Binder<'tcx, ty::TraitRef<'tcx>>>> sometimes. An early binder of an iterator :x

@bors

bors commented Oct 29, 2025

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #148220) made this pull request unmergeable. Please resolve the merge conflicts.

@lcnr
lcnrforce-pushed the opaques-early-binder branch from cd5dc48 to 3a6ab3fCompareOctober 29, 2025 09:45
@rustbot

This comment has been minimized.

Comment on lines +824 to +828
let ty = match defining_scope_kind {
DefiningScopeKind::HirTypeck => {
fold_regions(tcx, self.ty, |_, _| tcx.lifetimes.re_erased)
}
DefiningScopeKind::MirBorrowck => self.ty,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

rustfmt went out of its way to make a match arm bigger just because it had more space? wut

location_map: Rc<DenseLocationMap>,
hidden_types: &mut DefinitionSiteHiddenTypes<'tcx>,
hidden_types: &mut FxIndexMap<LocalDefId, ty::DefinitionSiteHiddenType<'tcx>>,
opaque_types: &[(OpaqueTypeKey<'tcx>, OpaqueHiddenType<'tcx>)],

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

should rename OpaqueHiddenType to ProvisionHiddenType so that its always clear that there are two "kinds" of hidden types.

@BoxyUwUBoxyUwU 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-review Status: Awaiting review from the assignee but also interested parties. labels Oct 31, 2025
@lcnr
lcnrforce-pushed the opaques-early-binder branch from 3a6ab3f to 5cbb5d0CompareOctober 31, 2025 13:53
@rustbot

Copy link
Copy Markdown
Collaborator

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.

@BoxyUwU

Copy link
Copy Markdown
Member

@bors r+

@bors

bors commented Nov 1, 2025

Copy link
Copy Markdown
Collaborator

📌 Commit 5cbb5d0 has been approved by BoxyUwU

It is now in the queue for this repository.

@borsbors 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 1, 2025
@bors

bors commented Nov 2, 2025

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 5cbb5d0 with merge 96b6152...

bors added a commit that referenced this pull request Nov 2, 2025
split definition and use site hidden tys
Tracking this implicitly is kinda messy and easy to get wrong.
r? `@BoxyUwU`
@bors

bors commented Nov 2, 2025

Copy link
Copy Markdown
Collaborator

💔 Test failed - checks-actions

@borsbors 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 Nov 2, 2025
@Zalathar

Copy link
Copy Markdown
Member

Looks like a CI runner flaked out.

@bors retry

@borsbors 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 Nov 2, 2025
bors added a commit that referenced this pull request Nov 2, 2025
split definition and use site hidden tys
Tracking this implicitly is kinda messy and easy to get wrong.
r? `@BoxyUwU`
@bors

bors commented Nov 2, 2025

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 5cbb5d0 with merge b8a3683...

Zalathar added a commit to Zalathar/rust that referenced this pull request Nov 2, 2025
split definition and use site hidden tys
Tracking this implicitly is kinda messy and easy to get wrong.
r? `@BoxyUwU`
@ZalatharZalathar mentioned this pull request Nov 2, 2025
@Zalathar

Copy link
Copy Markdown
Member

Yielding to enclosing rollup.

@bors retry

bors added a commit that referenced this pull request Nov 2, 2025
Rollup of 9 pull requests
Successful merges:
- #147947 (Implement `strip_circumfix` lib feature)
- #148170 (split definition and use site hidden tys)
- #148194 (compiletest: Remove `cleanup_debug_info_options`)
- #148199 (compiletest: Don't modify `testpaths` when creating aux contexts)
- #148240 (rustc_codegen: fix musttail returns for cast/indirect ABIs)
- #148290 (Do not emit solver errors that contain error types)
- #148357 (temporary-lifetime-extension.rs test works in all editions)
- #148362 (docs: makes a note about possible building `rustc 1.91.0 + host tools` for win7)
- #148367 (Use --print host-tuple to get the host)
r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 2, 2025
split definition and use site hidden tys
Tracking this implicitly is kinda messy and easy to get wrong.
r? `@BoxyUwU`
This was referenced Nov 2, 2025
bors added a commit that referenced this pull request Nov 2, 2025
Rollup of 8 pull requests
Successful merges:
- #148170 (split definition and use site hidden tys)
- #148194 (compiletest: Remove `cleanup_debug_info_options`)
- #148199 (compiletest: Don't modify `testpaths` when creating aux contexts)
- #148290 (Do not emit solver errors that contain error types)
- #148357 (temporary-lifetime-extension.rs test works in all editions)
- #148362 (docs: makes a note about possible building `rustc 1.91.0 + host tools` for win7)
- #148367 (Use --print host-tuple to get the host)
- #148374 (miri subtree update)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit 8e14ab7 into rust-lang:masterNov 2, 2025
11 of 12 checks passed
@rustbotrustbot added this to the 1.93.0 milestone Nov 2, 2025
rust-timer added a commit that referenced this pull request Nov 2, 2025
Rollup merge of #148170 - lcnr:opaques-early-binder, r=BoxyUwU
split definition and use site hidden tys
Tracking this implicitly is kinda messy and easy to get wrong.
r? ``@BoxyUwU``
github-actionsBot pushed a commit to rust-lang/miri that referenced this pull request Nov 3, 2025
Rollup of 8 pull requests
Successful merges:
- rust-lang/rust#148170 (split definition and use site hidden tys)
- rust-lang/rust#148194 (compiletest: Remove `cleanup_debug_info_options`)
- rust-lang/rust#148199 (compiletest: Don't modify `testpaths` when creating aux contexts)
- rust-lang/rust#148290 (Do not emit solver errors that contain error types)
- rust-lang/rust#148357 (temporary-lifetime-extension.rs test works in all editions)
- rust-lang/rust#148362 (docs: makes a note about possible building `rustc 1.91.0 + host tools` for win7)
- rust-lang/rust#148367 (Use --print host-tuple to get the host)
- rust-lang/rust#148374 (miri subtree update)
r? `@ghost`
`@rustbot` modify labels: rollup
@lcnr
lcnr deleted the opaques-early-binder branch November 3, 2025 10:44
github-actionsBot pushed a commit to model-checking/verify-rust-std that referenced this pull request Nov 30, 2025
…iaskrgr
Rollup of 8 pull requests
Successful merges:
- rust-lang#148170 (split definition and use site hidden tys)
- rust-lang#148194 (compiletest: Remove `cleanup_debug_info_options`)
- rust-lang#148199 (compiletest: Don't modify `testpaths` when creating aux contexts)
- rust-lang#148290 (Do not emit solver errors that contain error types)
- rust-lang#148357 (temporary-lifetime-extension.rs test works in all editions)
- rust-lang#148362 (docs: makes a note about possible building `rustc 1.91.0 + host tools` for win7)
- rust-lang#148367 (Use --print host-tuple to get the host)
- rust-lang#148374 (miri subtree update)
r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

5 participants

@lcnr@rustbot@bors@BoxyUwU@Zalathar