diff options
| author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2021-10-19 00:00:00 +0000 |
|---|---|---|
| committer | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2021-10-19 00:00:00 +0000 |
| commit | 7581bae99615f0b7b3dd973a59448659d2946656 (patch) | |
| tree | a0e987f850373d178c2e330f9e7e53edae1e35e5 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs | |
| parent | 1af55d19c7a9189374d89472f97dc119659bb67e (diff) | |
| download | rust-7581bae99615f0b7b3dd973a59448659d2946656.tar.gz rust-7581bae99615f0b7b3dd973a59448659d2946656.zip | |
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.
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs')
0 files changed, 0 insertions, 0 deletions
