[GSoC] Rust Drop trait support in gccrs - Status Report
Janet Chien
lishin1008@gmail.com
Fri Jun 19 13:27:17 GMT 2026
Hi,
My name is Janet, and my GSoC project is about implementing Rust Drop
trait support in gccrs, the Rust frontend for GCC.
Here is my latest status report for the project.
Current status:
- The draft PR I mentioned in my previous report has now been merged:
https://github.com/Rust-GCC/gccrs/pull/4564
- This PR introduced the basic infrastructure for tracking drop
candidates and inserting Drop calls. Based on this infrastructure, it
supports basic block-exit cases and some basic function-scope cases.
- I also investigated the Drop insertion points in rustc 1.49 and
adjusted the work order. I am planning to extend function-scope
support first, followed by explicit return, continue, and break cases.
Progress this week:
- Work on a follow-up cleanup and refactoring patch based on comments
from the previous PR. This includes refactoring CompileDrop and adding
DropBuilder. (currently working on this)
- Continue working on function-scope Drop support, including cases such
as:
fn f() -> i32 {
let x = Droppable;
foo()
}
fn foo(x: Droppable) {
}
Janet
More information about the Gcc
mailing list