Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
In general I agree with this but that is not the reason there are two separate functions here. The discussions here and here seem to have come to the conclusion that retain_mut is being added as a backwards compatible fix for retain.
Anybody knows when cargo-add will be distributed in stable cargo? Seems merged already.
This is one of the eventual goals of the unstable provide_any feature, which will allow (among other things) adding additional optional APIs to dyn Error. See also the related RFC 2895, the author of which notes explicitly:
From https://github.com/rust-lang/compiler-team/issues/493
// SAFETY: The `add` here is safe, because: // // - Both pointers are part of the same object, as pointing directly // past the object also counts. // // - The size of the slice is never larger than isize::MAX bytes, as // noted here: // - https://github.com/rust-lang/unsafe-code-guidelines/issues/102#issuecomment-473340447 // - https://doc.rust-lang.org/reference/behavior-considered-undefined.html // - https://doc.rust-lang.org/core/slice/fn.from_raw_parts.html#safety // (This doesn't seem normative yet, but the very same assumption is // made in many places, including the Index implementation of slices.) // // - There is no wrapping around involved, as slices do not wrap past // the end of the address space.
Related posts
- [privacy/compile-time]: Building rust/cargo projects may leak the compiler's pc username as full homedir paths are getting compiled in - even in the release (and striped) binaries. (the user supposedly distributes these binaries) Is this intended for some reason?
- Announcing Rust 1.60.0
- This Week in Rust #415
- Announcing Rust 1.51.0
- Making Rust binaries smaller by default