Rearranging across the interface
Rearranging across the interface
Posted Feb 26, 2025 15:45 UTC (Wed) by Wol (subscriber, #4433)In reply to: Rearranging across the interface by farnz
Parent article: Rewriting essential Linux packages in Rust
So what you're saying is, if you the programmer move the checks across the interface boundary, the compiler has no way of knowing you've done it?
Hmmm ...
That is an edge case, but equally, you do want the compiler to catch it, and I can see why it wouldn't ... but if you're building a library I find it hard to see why you the programmer would want to do it - surely you'd either have both sides of the interface in a single crate, or you're explicitly moving stuff between a library and an application ... not good ...
Cheers,
Wol
