Theseus is a modern OS written from scratch in Rust that explores 𝐢𝐧𝐭𝐫𝐚𝐥𝐢𝐧𝐠𝐮𝐚𝐥 𝐝𝐞𝐬𝐢𝐠𝐧: closing the semantic gap between compiler and hardware by maximally leveraging the power of language safety and affine types. Theseus aims to shift OS responsibilities like resource management into the compiler.
That was actually my first attempt but Rust doesn't allow for specialized Drop implementations :( (link)
Also, I checked the binary for a simplified version of the Frames tyepstates, and it doesn't seem like the match statement is elided. A generic drop function is called for all Frames objects.
Not relevant until PR #1004 is merged in.
_Originally posted by @Ramla-I in https://github.com/theseus-os/Theseus/pull/1004#discussion_r1272686882_