Closed
Description
I'd like the ability to forbid the use of unsafe_code
over all dependencies with at least a per-crate whitelist. For a quick PoC I've wrapped rustc to add --cap-lints=forbid
before cargo's arguments and use RUSTFLAGS=-Funsafe-code
to forbid unsafe code. No per-crate (or better) whitelist there.
While trying to write some async code I noticed that await!()
wasn't in core
#56767, so I checked the sources to find it is in std
but uses this scary attribute.
I agree #[allow_internal_unsafe]
should allow crates that forbid unsafe code to call the macro, but a crate with unsafe code forbidden shouldn't be able to use this attribute on its macros.