TedDriggs / darling

A Rust proc-macro attribute parser
MIT License
983 stars 66 forks source link

Bump to edition 2021 #281

Closed GnomedDev closed 5 months ago

GnomedDev commented 5 months ago

This crate is still on edition 2018 but it's MSRV is exactly the MSRV needed for 2021... so let's get this over with. It turns out that there were no changes required, but I fixed all the things missed for the 2018 migration by adding #![warn(rust_2018_idioms)].

TedDriggs commented 5 months ago

It looks like most of the code change here is due to the elided_lifetimes_in_paths lint, which says:

This lint is "allow" by default because it has some known issues, and may require a significant transition for old code.

Looking around further, it seems that use of that specific lint is not universally popular (source).

I'm otherwise supportive of this PR.

What would your thoughts be on allowing that one lint, and otherwise warning on 2018 idioms?

GnomedDev commented 5 months ago

I personally would take dtolnay's opinions with a grain of salt, as he opposes a lot of common guidelines. I have never seen a codebase which does not follow this lint and is using rust_2018_idioms, so would be quite opposed to not following common guideline.

TedDriggs commented 5 months ago

You’re right… it just looks uglier ☹️