#![restrict(unsafe, modules = "platform::win")] (bikesheddable)
Rust Internals
#![restrict(unsafe, modules = "platform::win")] (bikesheddable)
I've recently found myself creating a library which includes some platform-specific ffi usage as well as some much higher-level functionality, which I'd really rather not split into 2 crates. This means I cannot #![forbid(unsafe)] at the top level, only #![deny(unsafe)] and that allows #[expect(unsafe)] anywhere. Ideally, I would like to forbid unsafe except for a pre-determined set of modules, where it was simply deny-ed. I would see 2 advantages for this: added safety for anyone reviewing ...
0 comments
No comments yet.