News for hackers. Stuff that matters.
Re:The Plan for the Rust 2021 Edition by markwisde on Tuesday May 11, 2021 @01:21PM (#27120765)
“We can’t add tryinto to the prelude, as a solution we’re adding tryinto”

What?

Re:The Plan for the Rust 2021 Edition by steveklabnik on Tuesday May 11, 2021 @01:24PM (#27120799)
You 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.

Re:The Plan for the Rust 2021 Edition by Animats on Tuesday May 11, 2021 @04:48PM (#27123317)
Shouldn't more of those prelude items be in "core", rather than "std"? Many involve neither I/O nor allocation.
Re:The Plan for the Rust 2021 Edition by TheCoelacanth on Tuesday May 11, 2021 @05:21PM (#27123678)
All of the new items are in "core", e.g. https://doc.rust-lang.org/core/convert/trait.TryInto.html
Re:The Plan for the Rust 2021 Edition by 3836293648 on Tuesday May 11, 2021 @06:59PM (#27124694)
Everything 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)
Re:The Plan for the Rust 2021 Edition by markwisde on Tuesday May 11, 2021 @04:50PM (#27123336)
I don’t see how this solves the issue of colliding with a user-provided tryinto
Re:The Plan for the Rust 2021 Edition by msbarnett on Tuesday May 11, 2021 @05:16PM (#27123631)
It solves the issue by not breaking any existing code that doesn't explicitly opt in to the new edition.