What happens to the data referenced by the variable when it is returned to the caller? When the data is destroyed and possibly Drop trait gets executed?
What is the scope of the returned value in Rust?
597 Views Asked by AudioBubble At
2
What happens to the data referenced by the variable when it is returned to the caller? When the data is destroyed and possibly Drop trait gets executed?
Seems like you can (why not?):