3 ms·
“We can’t add tryinto to the prelude, as a solution we’re adding tryinto” What?
by markwisde 5y ago
“We can’t add tryinto to the prelude, as a solution we’re adding tryinto”
What?
- steveklabnik 5y agoYou cropped out the relevant part: > As a solution, Rust 2021 will use a new prelude. That is, we cannot add it into the existing prelude. But we could have a new prelude, tied to the new edition.
- Animats 5y agoShouldn't more of those prelude items be in "core", rather than "std"? Many involve neither I/O nor allocation.
- TheCoelacanth 5y agoAll of the new items are in "core", e.g. https://doc.rust-lang.org/core/convert/trait.TryInto.html https://doc.rust-lang.org/core/convert/trait.TryInto.html
- 3836293648 5y agoEverything in core is also in std. You only link to anything in core in a no_std context (or if you do it explicitly for some reason)
- markwisde 5y agoI don’t see how this solves the issue of colliding with a user-provided tryinto
- msbarnett 5y agoIt solves the issue by not breaking any existing code that doesn't explicitly opt in to the new edition.