aptos-core
aptos-core copied to clipboard
[Bug] [compiler-v2] variable never used, but borrowed
🐛 Bug
If the destination of an assignment is never used later, it should not be borrowed later.
_x = ...
// _x is definitely not borrowed here
Hence the last two conditions https://github.com/aptos-labs/aptos-core/blob/8b42857f0a0409a8957a18e1564116526de0548a/third_party/move/move-compiler-v2/src/pipeline/explicit_drop.rs#L184
should always be true. However, the debug assertion bellow is triggered in the indicated test case.