[GSoC] Rust Drop trait support in gccrs - Status Report 4
Janet Chien via Gcc <[email protected]> Sun, 19 Jul 2026 10:20:35 +0100
| Newsgroups | gmane.comp.gcc.devel |
|---|---|
| Message-ID | <CAHtgQQsDtZD8pJtRSZym-9_p_C56qfceAG3uYJ_s95F9F+Pm+Q@mail.gmail.com> |
Hi,
My name is Janet, and my GSoC project focuses on implementing
support for Rust's `Drop` trait in gccrs, the Rust frontend for GCC.
Here is my latest status report for the project.
Since my last report,
I mainly focused on changing block-scope Drop to use
`TRY_FINALLY_EXPR` cleanup instead of emitting Drop calls manually.
https://github.com/Rust-GCC/gccrs/pull/4685
And I pushed patches to:
1. Update the function-scope and explicit-return cases to use
try-finally cleanup.
- Function scope
Merged:
https://github.com/Rust-GCC/gccrs/pull/4711
- Explicit return
Under review:
https://github.com/Rust-GCC/gccrs/pull/4621
2. Add drop support for unlabeled continue and break.
Under review:
https://github.com/Rust-GCC/gccrs/pull/4710
Next steps / Currently working on:
- Continue updating the existing patches based on review feedback.
- Refactor the gccrs function-scope Drop design to align more
closely with rustc.
Reference:
https://github.com/Rust-GCC/gccrs/pull/4591#discussion_r3499748547