rust/compiler/rustc_const_eval/src
Tomasz Miąsko 7581bae996 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.
2021-10-19 00:00:00 +00:00
..
const_eval Add const_eval_select intrinsic 2021-10-12 05:42:23 +00:00
interpret Auto merge of #89514 - davidtwco:polymorphize-shims-and-predicates, r=lcnr 2021-10-17 12:33:12 +00:00
transform Fix const qualification when executed after promotion 2021-10-19 00:00:00 +00:00
util
lib.rs Adopt let_else across the compiler 2021-10-16 07:18:05 +02:00