Vetting the cargo
Vetting the cargo
Posted Jun 23, 2022 14:16 UTC (Thu) by mathstuf (subscriber, #69389)In reply to: Vetting the cargo by farnz
Parent article: Vetting the cargo
Note that Rust does have one handle to pull back an API: unsoundness. If an API cannot be used soundly, it is eligible for deprecation and eventual removal (this may involve an edition change) because an API just cannot be used properly. For example `std::mem::uninitialized()` is off limits because `let b: bool = std::mem::uninitialized();` is instant UB because a `bool` may only have a binary value of 1 or 0 (that is, it may appear to be neither `true` nor `false` with some other bit pattern). Now there is the `std::mem::MaybeUninit` type to handle the use case.
