rust/compiler/rustc_const_eval
Yuki Okushi a656bc5b08
Rollup merge of #90069 - tmiasko:promoted-const-qualif, r=oli-obk
Fix const qualification when executed after promotion

The const qualification was so far performed before the promotion and
the implementation assumed that it will never encounter a promoted.

With `const_precise_live_drops` feature, checking for live drops is
delayed until after drop elaboration, which in turn runs after
promotion. so the assumption is no longer true. When evaluating
`NeedsNonConstDrop` it is now possible to encounter promoteds.

Use type base qualification for the promoted. It is a sound
approximation in general, and in the specific case of promoteds and
`NeedsNonConstDrop` it is precise.

Fixes #89938.
2021-10-22 19:42:49 +09:00
..
src Rollup merge of #90069 - tmiasko:promoted-const-qualif, r=oli-obk 2021-10-22 19:42:49 +09:00
Cargo.toml Remove unused dependencies from rustc_const_eval 2021-10-14 15:42:42 -05:00