|
|
|
|
|
by TheDong
1235 days ago
|
|
Ah, yeah, hand-writing a Cargo.toml like that does run into that issue. However, I don't think the solution is a better default, but rather the solution is time-travel. Defaulting to the latest edition would mean that any rust library that predates editions would likely break when you imported it (since it would default to an edition that didn't exist when it was written, and editions are allowed to make breaking changes of that sort). The thing that would fix your issue would be time-traveling back in time to when cargo was created, and making edition a required field of all cargo.toml files that results in an error until you add one. That would have saved you from any trouble. Rust could also do a python2 -> python3 like transition, where crates from the old "edition not required" world can't be imported anymore at all, but that seems like a very small thing to cause so much ecosystem pain over. |
|