4 ms·
Yeah. Rust's standard library already has cruft (e.g., std::error::Error deprecations), and some potential sore spots (no custom allocators, Pin/Promise unsound
by ragnese 6y ago
Yeah. Rust's standard library already has cruft (e.g., std::error::Error deprecations), and some potential sore spots (no custom allocators, Pin/Promise unsoundness: https://internals.rust-lang.org/t/unsoundness-in-pin/11311 https://internals.rust-lang.org/t/unsoundness-in-pin/11311).
I do wonder if there's some way to hide parts of the standard library with the Rust "edition" mechanism. It'll stay there, technically, for backwards compatibility, but any one who opts in to the new edition wouldn't see deprecated stuff exported from the std prelude.
- nynx 6y agoCustom allocators are coming soon.
- ragnese 6y agoRight, but there was some frustration expressed in the discussions (IIRC) because you can't break backwards compat. So you can't just pass in an allocator to functions that might allocate. I don't have any skin in the game and don't really care how custom allocators will work (I'm glad the feature will exist, though).
- Ar-Curunir 6y ago> I do wonder if there's some way to hide parts of the standard library with the Rust "edition" mechanism. It'll stay there, technically, for backwards compatibility, but any one who opts in to the new edition wouldn't see deprecated stuff exported from the std prelude. Maybe in the future one could introduce pub(< ed2018) to indicate that an item is available only before edition 2018
- steveklabnik 6y agoThis has been discussed, but it's got pros and cons, and is semi-controversial. We'll see.
- Ar-Curunir 6y agoRight, that’s what folks said the last time I asked about it. That’s why I put a maybe there :P
- kibwen 6y ago> Pin/Promise unsoundness Note that there was only a brief window between the bug there being reported and the fix landing. These days the only way to exploit any unsoundness there is via using unstable features, and as long as there's a soundness exploit those features certainly won't be stabilized.
- ragnese 6y agoThank goodness. I didn't realize that the unsoundness was now contained to unstable features.