-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Transitioning a 3rd party crate (conrod) to 2018 edition #56029
Comments
I only took a cursory glance, but I think I can explain this. Conrod's _-suffixed macros are for use within conrod itself, where
Unfortunately, errors in proc_macro-generated code often don't point to anything useful in the original source. |
Then it looks like unimplemented edition hygiene for absolute paths (including imports) - #50999. If macro defined by 2015 edition crate produces path |
The macro is defined by the 2018 edition, so the 2018 import rules should apply. |
This is functionally identical to |
Hm, so anyone knows how to fix this? I tried changing the I also tried some other tricks (like matching on the nevermind, the matching worked, I just wonder what's the right solution to get a ident for "crate" it's like a box of worms. Whatever I fix, there is still something else to fix. I am hereby giving up. |
Closing as this doesn't seem to be a specific issue. |
Hello!
I am trying to migrate https://github.com/PistonDevelopers/conrod to 2018 edition.
https://rust-lang-nursery.github.io/edition-guide/editions/transitioning-an-existing-project-to-a-new-edition.html states that:
So, here I am, although this may very well be a layer 8 problem.
What I did: I checked out conrod and first migrated
conrod_derive
viacargo fix --edition
But it turned out to be quite tedious until I found out about:
cargo fix --prepare-for 2018
(any reason this is not more prominently mentioned in the guide?)Then all the low hanging fruits were done automagically - great! (My compliments/gratitude here!)
I then proceeded enabling
edition = 2018
in theCargo.toml
file and then the nightmare started:Appears a few dozen times for different files! (and if it's not
WidgetStyle_
then it's theWidgetCommon_
macro)use crate::theme::Theme;
does not help at all, sadly.When I try to use
use conrod_derive::WidgetStyle_
nothing changes.When I use:
use conrod_derive::style::WidgetStyle_;
I get a lot more errors, now saying:if I follow that hint, I get the same errors as before adding the crate attribute with the addition of
because style is not public... but I made it public already and the same error is still present.
Here is where I give up and let someone smarter than me point me in the right direction, because obviously I am doing something wrong.
Sorry for bothering the bugtracker with what is probably my fault and mine alone, but it was suggested and I am kind of desperate to understand this now (how else can I improve?)
The text was updated successfully, but these errors were encountered: