[Bug][compiler-v2] Difference in compiler v1 and v2 when actively borrowed variable is destroyed #14387
Labels
bug
Something isn't working
compiler-v2
stale-exempt
Prevents issues from being automatically marked and closed as stale
🐛 Bug
Consider the following code:
Compiler v1 - provides the following error:
But compiler v2 accepts this code (and inserts a copy of the actively borrowed variable, which is then destroyed). Such a silent copy insertion may not be obvious to the user, so we may want to do what compiler v1 does here.
The text was updated successfully, but these errors were encountered: