about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src/lib.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-10-25 02:01:04 +0000
committerbors <bors@rust-lang.org>2023-10-25 02:01:04 +0000
commit2e4e2a8f288f642cafcc41fff211955ceddc453d (patch)
tree3d30683c6af4d121d9f05f106962bdd69b4478c3 /compiler/rustc_mir_transform/src/lib.rs
parent848a387967280771fb0cb7aec59f79ecb92cf0d3 (diff)
parenta986ab4d4d72d2cfb7b8d38dd4648ffb4d636c4c (diff)
downloadrust-2e4e2a8f288f642cafcc41fff211955ceddc453d.tar.gz
rust-2e4e2a8f288f642cafcc41fff211955ceddc453d.zip
Auto merge of #117139 - compiler-errors:vid-lifetimes, r=BoxyUwU
Get rid of `'tcx` lifetime on `ConstVid`, `EffectVid`

These are simply newtyped numbers, so don't really have a reason (per se) to have a lifetime -- `TyVid` and `RegionVid` do not, for example.

The only consequence of this is that we need to use a new key type for `UnifyKey` that mentions `'tcx`. This is already done for `RegionVid`, with `RegionVidKey<'tcx>`, but this `UnifyKey` trait implementation may have been the original reason to give `ConstVid` a lifetime. See the changes to `compiler/rustc_middle/src/infer/unify_key.rs` specifically.

I consider the code cleaner this way, though -- we removed quite a few unnecessary `'tcx` in the process. This also makes it easier to uplift these two ids to `rustc_type_ir`, which I plan on doing in a follow-up PR.

r? `@BoxyUwU`
Diffstat (limited to 'compiler/rustc_mir_transform/src/lib.rs')
0 files changed, 0 insertions, 0 deletions