-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update all the crates to the 2021 edition #3568
Conversation
# hack to get a `diesel` item inside of diesel | ||
# as well as for using diesel-derives in external crates | ||
edition = "2015" | ||
edition = "2021" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need this 2015, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We needed it before #3564
I tried that migration already yesterday and noticed that dependencies. I did not think much about that and went on trying to minimize one of the rust-analyzer type issues with diesel, so that the rust-analyzer team had at least a minimal example without depending on diesel. While doing that someone from that team said that they cannot explain how name resolution even worked for code generated by diesel proc-macro. Because I hit that by accident a bit earlier I was able to explain that and they suggested the extern crate self as diesel;
fix. That in turn remove the need to use the 2015 edition there, so after all that's all somehow related.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird, I remember trying this exact trick when I was refactoring the derives. But, it didn't work back then, so I thought maybe the issue was something else and ended up keeping the old hack.
#[cfg(feature = "sqlite")] | ||
extern crate diesel_migrations; | ||
extern crate dotenvy; | ||
extern crate quickcheck; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mistake?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's fine. extern crate …
statements are not required anymore, so we can remove them (even those with a #[cfg]
on.)
This is mostly just running `cargo fix --edition` and `cargo fix --edition-idioms`
17bee10
to
aa28629
Compare
This is mostly just running
cargo fix --edition
andcargo fix --edition-idioms