gnu/gcc/8bc32075bb2e59bc4915093c87e488ec30f2c2b3 gccrs: add drops at the end of function bodies
Add function-scope Drop support for the implicit return case.
Add two test cases. This does not yet support explicit return.
gcc/rust/ChangeLog:
* backend/rust-compile-base.cc (HIRCompileBase::compile_function_body):
Add drop calls at the end of function bodies.
gcc/testsuite/ChangeLog:
* rust/execute/drop-function-scope-unit.rs: New test.
* rust/execute/drop-function-scope.rs: New test.
Signed-off-by: lishin <lishin1008@gmail.com>
3 files changed