2 ms·
I am sure I am not the first to think of this but here's an idea: Can we have a compiler flag or a Cargo switch inside the project's file that disables all std
by pdimitar 5y ago
I am sure I am not the first to think of this but here's an idea:
Can we have a compiler flag or a Cargo switch inside the project's file that disables all std API that can panic? Basically complain that the function is not found.
I for one always strive to write my Rust code with `Result<T>` and never rely on panics so I'd love it if that can actually be enforced and checked by the compiler.
- steveklabnik 5y agoNot currently, but it is theoretically possible.
- pdimitar 5y agoObviously those of us not in the core team can only fill wish lists. :) And I don't want to sound entitled! But I hope that if it's both possible and not very hard, then it will be considered. I'd personally love to double down on Rust's safety and dial it to eleven in all my hobby and commercial projects.
- steveklabnik 5y agoIt is not simple. But I would like to see it someday too :)