-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Remove indices from fresh ty/const vars. #144581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
changes to the core type system Some changes occurred to the CTFE machinery Some changes occurred to the CTFE / Miri interpreter cc @rust-lang/miri |
I'm not sure if this is legitimate. All the tests pass locally, but I'm getting an ICE when compiling
|
@bors try |
Remove indices from fresh ty/const vars.
This comment has been minimized.
This comment has been minimized.
it's not legitimate sadly we use their index to make sure different infer vars result in different fresh variables. We use freshened infer vars for caching and need a differetn cache entry for |
Would that end up being It's curious how close this is to working. When I first tried it I was expecting failures all over the place. When the ui tests and other tests passed I thought it was legitimate. |
Each of `InferTy::Fresh{Ty,IntTy,FloatTy}` and `InferConst::Fresh` have a `u32` index. It turns out the index is only used for some weak sanity checking during freshening and can be removed, making these values a bit like `ReErased`. This change simplifies things quite a bit, e.g. `TypeFreshener` no longers needs maps, and we can eliminate a bunch of pre-interned fresh types.
db9c00f
to
089de8b
Compare
Each of
InferTy::Fresh{Ty,IntTy,FloatTy}
andInferConst::Fresh
have au32
index. It turns out the index is only used for some weak sanity checking during freshening and can be removed, making these values a bit likeReErased
.This change simplifies things quite a bit, e.g.
TypeFreshener
no longers needs maps, and we can eliminate a bunch of pre-interned fresh types.r? @lcnr