Skip to content

traits: Represent live alias arguments as bitsets - #160936

Open
Dnreikronos wants to merge 1 commit into
rust-lang:mainfrom
Dnreikronos:traits/live_args_bitset
Open

traits: Represent live alias arguments as bitsets#160936
Dnreikronos wants to merge 1 commit into
rust-lang:mainfrom
Dnreikronos:traits/live_args_bitset

Conversation

@Dnreikronos

@Dnreikronos Dnreikronos commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Split out of #160212 per review / Zulip: https://rust-lang.zulipchat.com/#narrow/channel/364551-t-types.2Ftrait-system-refactor/topic/rigid.20aliases.20in.20region.20handling/near/615557841

live_args_for_alias_from_outlives_bounds and args_known_to_outlive_alias_params now return identity arg indices (DenseBitSet) instead of EarlyBinder<GenericArg>. Callers just do args[idx].visit_with(...), so we stop laundering rigidness through binder instantiate. Also drops the old BitSet FIXME.

imo this is worth doing on its own even without the ICE fix. every time we shoved identity params through EarlyBinder we were writing down something we don't actually know, and this module is only going to grow. better to make the invariant explicit now than keep paying for it later.

No behavioral change intended. the rigid-alias ICE / extract_verify_if_eq bits stay on #160212. btw if that one should stack on this instead of staying independent, lmk and I'll rebase it asap.

Store identity argument indices instead of bound generic arguments so
callers can index concrete alias arguments without changing rigidness
through instantiation.
@rustbot

rustbot commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@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 11, 2026
@rustbot

rustbot commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

r? @JohnTitor

rustbot has assigned @JohnTitor.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler, types
  • compiler, types expanded to 75 candidates
  • Random selection from 18 candidates

@Dnreikronos

Dnreikronos commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

@lcnr hey, this is the bitset-only split from #160212 / the Zulip thread: https://rust-lang.zulipchat.com/#narrow/channel/364551-t-types.2Ftrait-system-refactor/topic/rigid.20aliases.20in.20region.20handling/near/615557841

fyi no matcher / ICE changes here. just arg indices via DenseBitSet, so callers do args[idx] instead of EarlyBinder + instantiate. also kills the BitSet FIXME.

imo this is the boring half and should be easy to land first. the interesting open question (proper matching vs underapproximating in extract_verify_if_eq) stays on #160212. lmk if anything looks off or if you want me to rebase that one on top of this asap.

@panstromek

Copy link
Copy Markdown
Contributor

@bors try @rust-timer queue

I assume we want to test perf on this, this seems like it could have perf implications.

@rust-timer

Copy link
Copy Markdown
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Aug 11, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Aug 11, 2026
traits: Represent live alias arguments as bitsets
@rust-bors

rust-bors Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: eb7fea4 (eb7fea435c224921ea27002d0fa50f308f2a2e00)
Base parent: e64c8a6 (e64c8a664d9da54fc239cd4404cbf67f0d624326)

@rust-timer

Copy link
Copy Markdown
Collaborator

Queued eb7fea4 with parent e64c8a6, future comparison URL.
There are currently 0 preceding artifacts in the queue.
It will probably take at least ~1.0 hours until the benchmark run finishes.

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

Labels

S-waiting-on-perf Status: Waiting on a perf run to be completed. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants