Remove indices from fresh ty/const vars.#144581
Remove indices from fresh ty/const vars.#144581nnethercote wants to merge 1 commit intorust-lang:masterfrom
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
|
aaaah, |
Each of
InferTy::Fresh{Ty,IntTy,FloatTy}andInferConst::Freshhave au32index. 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.
TypeFreshenerno longers needs maps, and we can eliminate a bunch of pre-interned fresh types.r? @lcnr