-
Notifications
You must be signed in to change notification settings - Fork 764
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
Rename try!
macro for 2018 compatibility
#1385
Comments
Hm, it's not clear to me that Serde should be responsible for making this change? That is, when/if Serde migrates to 2018 edition then it should but prior to that it was my understanding that edition hygiene should not require this -- am I wrong about that? |
You're correct that users should not get edition related warnings from the expansion of external macros. |
I'm not quite sure what the intent of this issue is then since I can't seem to produce any warnings -- is this just a long-term cleanup? |
I'm not clear then. Is this something we need to prioritize before the edition? Or is this just tracking work that needs to happen at some point before we change our own edition to 2018, which may be years later? |
According to the user report on internals, the compiler might not be successfully performing edition hygiene in all cases. Obviously, this is a bug in the compiler. But this seems like a small change to serde_derive that would help mitigate edition hygiene bugs and keep them from impacting the many users of this crate. |
Internals thread: Trying Rust2018, getting many warnings on `try` is a keyword I am not able to reproduce the warnings reported there. If anyone succeeds in reproducing and can explain why this is something that a large number of users would encounter, then I can reconsider, but for now I am closing this issue. Thanks anyway! We'll take care of this when moving Serde to 2018 but don't need an issue to track this specific piece of that work. Hopefully this helps track down the remaining places were edition hygiene is going wrong. I believe our use of |
This fixes serde-rs#1385.
This fixes serde-rs#1385.
This fixes serde-rs#1385.
For me there is a warning in my emacs. My configuration (relevant part is lines 80 to 90) is inspired by a fairly common configuration for Rust development from reddit. The warning is triggered whenever I save the file, my screen gets split in two halves and the bottom half shows the exception (twice for whatever reason): If this is theoretically just an issue of replacing ~200 occurances of
My Rust skills are limited, so I actually have no idea if replacing Edit:
|
That looks like the emacs integration is building the code using the wrong edition. Is there a bug report about that? |
At my previous comment, my
I removed every toolchain with
I also removed all of my rust-related
With that, the error message changed slightly but is still largely the same: |
I will lock this issue for now because this isn't the place to debug that particular emacs bug. |
serde derive uses a custom defined
try!
macro internally, rather than?
. However,try
is becoming a reserved word in the 2018 edition. For compatibility with 2018, it would be ideal if you renamed this macro.The text was updated successfully, but these errors were encountered: