rust-lang / const-eval

home for proposals in and around compile-time function evaluation
Apache License 2.0
105 stars 17 forks source link

lifetime extension: mention how projections are handled #63

Closed RalfJung closed 3 years ago

RalfJung commented 3 years ago

This is based on reading the following code:

https://github.com/rust-lang/rust/blob/c4926d01ada661d4fbffb0e5b1708ae5463d47b3/compiler/rustc_mir/src/transform/promote_consts.rs#L1008

and based on the fact that promoted projections can contain array/slice indexing depending on runtime values.