traits: Represent live alias arguments as bitsets - #160936
Conversation
Store identity argument indices instead of bound generic arguments so callers can index concrete alias arguments without changing rigidness through instantiation.
|
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
|
r? @JohnTitor rustbot has assigned @JohnTitor. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
@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 imo this is the boring half and should be easy to land first. the interesting open question (proper matching vs underapproximating in |
|
@bors try @rust-timer queue I assume we want to test perf on this, this seems like it could have perf implications. |
|
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
This comment has been minimized.
This comment has been minimized.
traits: Represent live alias arguments as bitsets
|
Queued eb7fea4 with parent e64c8a6, future comparison URL. |
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_boundsandargs_known_to_outlive_alias_paramsnow return identity arg indices (DenseBitSet) instead ofEarlyBinder<GenericArg>. Callers just doargs[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
EarlyBinderwe 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_eqbits stay on #160212. btw if that one should stack on this instead of staying independent, lmk and I'll rebase it asap.