about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
diff options
context:
space:
mode:
authorDylan MacKenzie <ecstaticmorse@gmail.com>2020-01-28 23:20:27 -0800
committerDylan MacKenzie <ecstaticmorse@gmail.com>2020-02-07 19:41:10 -0800
commitb23d910d570b392b1740ef1bb888f04194fe82c1 (patch)
tree1821fe15483d43fbf1eacb5ac2bce15f066fad64 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
parenta29424a2265411dda7d7446516ac5fd7499e2b55 (diff)
downloadrust-b23d910d570b392b1740ef1bb888f04194fe82c1.tar.gz
rust-b23d910d570b392b1740ef1bb888f04194fe82c1.zip
Skip `Drop` terminators for enum variants without drop glue
When doing drop elaboration for an `enum` that may or may not be moved
out of (an open drop), we check the discriminant of the `enum` to
see whether the live variant has any drop flags and then check the drop flags
to see whether we need to drop each field. Sometimes, however, the live
variant has no move paths. In this case, we still emit a drop terminator
for the entire enum after checking the enum discriminant.

This commit skips emitting the drop terminator when the "otherwise"
variants, those without move paths, have no drop glue. This was
frequently the case with `Option`, as the `None` variant has no drop
glue and no move path.
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs')
0 files changed, 0 insertions, 0 deletions