-
-
Notifications
You must be signed in to change notification settings - Fork 416
Open
Labels
Description
Use Case:
Unsafe is used almost everywhere in the code. No benchmarks are there to make sure that they give a true benefit over safe alternatives.
One instance if find a bit too unsafe-happy is
unsafe { MaybeUninit::zeroed().assume_init() }which even if it is correct now can very easily break at no additional gain in performance, it's literally the same as the safe version:
compiler explorer
Proposed Change:
progressively phase out unsafe code where possible, and where impossible wrap them in primitives that can be extracted to a well tested subcrate, leaving the main crate eventually #![forbid(unsafe_code)]
Who Benefits From The Change(s)?
The whole community, from safe rust garantees, the devs for less bugs to fix, less cases to test
Alternative Approaches
live dangerously
Reactions are currently unavailable